
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to generate dates backwards using addmonths function ?
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.
- « Previous Replies
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try with this, column New 1a that I created in the script.
You can also think if you want to can select only one value in Datafield listbox with a trigger.
I hope this can help you.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
generate where? in your reload script? Day(Yourdate) & Month(Yourdate)-iter() & Year(yourdate) should do it with a while statement. Just format it correctly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
when i select a particular date in a calendar table then i need to display that 12 dates in a textbox.
thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my suggestion is that you generate those dates in your reload script as I explained above and then use concat to display them in the text object
What is the purpose of that actually?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you want to display something like this?
Try this (I used Today(), but you can use Max(DateField))
=Date(Today() -1) & Chr(13) &
Date(Today() -2) & Chr(13) &
Date(Today() -3) & Chr(13) &
Date(Today() -4) & Chr(13) &
Date(Today() -5) & Chr(13) &
Date(Today() -6) & Chr(13) &
Date(Today() -7) & Chr(13) &
Date(Today() -8) & Chr(13) &
Date(Today() -9) & Chr(13) &
Date(Today() -10) & Chr(13) &
Date(Today() -11) & Chr(13) &
Date(Today() -12)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunindia what you suggest works only for today.
Ajinkya wants : when i select a particular date in a calendar table then i need to display that 12 dates in a textbox.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and it is not the previous 12 day, it is the previous 12 months with that date

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My bad, just realized you have Date as DD/MM/YYYY and I think you needed last 12 months like this:
Expression:
=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')


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at this: Change Date by Button

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We just need to replace Today() with Max(DateField) to make it work for the selection, isn't that true? and Yes I realized that he wanted to go back 12 months instead of 12 dates, so I changed my expression in the below post.

- « Previous Replies
- Next Replies »