Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The scenario is like this,
if i select today's date i.e 15-06-2015 the i need to generate 12 number of dates in backward manner for each month, for example
for date 15-06-2015, it should generate-
15-05-2015
15-04-2015
15-03-2015
15-02-2015
15-01-2015
15-12-2014
15-11-2014
15-10-2014
15-09-2014
.
.
.
15-06-2014
Thanks.
no , actually i want to decrease the 'MM' value , not the 'DD' value.
thanks.
Give this a try and use Max(YourDateField) instead of Today()
=Date(AddMonths(Today(), -1), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -2), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -3), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -4), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -5), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -6), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -7), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -8), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -9), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -10), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -11), 'DD/MM/YYYY') & Chr(13) &
Date(AddMonths(Today(), -12), 'DD/MM/YYYY')
ifit is only one selected date
otherwise it will not work
Not true, Max(Date) will work in multiple selections as well. (Note: I am not using Only(Date))
Hi ,
isn't there a more efficient way to do it ?
thanks
yes but if I as a user select 2 dates, I expect to it work for both, not only the max
I all comes down to what Ajinkya is trying to achieve here...
Yup, that is absolutely true
It ultimately comes down to what ajinkya333 wants to achieve.
actually user will select only one date at a time.
can we use iterno function somehow ?
Hi,
I do two solutions.
The first with object calendar and the second with listbox.
I hope this can help you.
Regards
/Giuseppe