hi all,
How to get months between two dates which is in the format yyyy/mm.
eg : 2003/08 and 2000/12
Thanks for any help in advance....
what you want to calculate No. of months between two dates(Difference) or Month Names between this two Dates ?
No. of months between two dates(Difference)
A relative easy calculation would be to take the year part of the item , multiply this by 12 and add the month value. Subtracting these 2 values would yield the difference in months.
Assuming the item is in string format:
cast(substring([someitem],1,4),integer)*12 + cast(substring([someitem],6,2),integer)
2003/08 would yield: 24044
2000/12 would yield: 24012
difference = 24044-24012 = 32 months
Thanks,blom0344,What if it is Month Names between this two Dates ?
A difference would yield a numerical value. I honestly do not understand your question. Please elaborate !!
Do you mean you want to supply two dates and see all the months between those two dates displayed? If so, you need to display the Month item in your report, and add a filter which prompts for the start date and end date required.
Regards,
MF.