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.
Try this:
=Concat(Date(AddMonths(Today(), ValueLoop(-1, -12, -1)), 'DD/MM/YYYY'), Chr(13), -AddMonths(Today(), ValueLoop(-1, -12, -1)))
Thanks GGALLINA
actually i was wondering if we can do the same stuff, in the script itself ?
i have created a list box with 12 values associated with each date in datefield, now how can we proceed with that ?
we need to modify the 'i' value to a proper date format
Hi,
do you mean this (please see attachment, listbox New i)?
Regards.
hey,
actually we are supposed to create a new column 'new i ' for the table(in script) instead of writing an expression for the list box.
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.
Thanks a lot GGALLINA
it really helped
You are welcome!
Regards.
hey GGALLINA, can you suggest a modification for the list you generated(new 1a), can we restrict that list till the current year only ? i mean if the date is 25-04-2015 then we should go like 25-03-2015 ,25-02-2015 ,25-01-2015.
i.e we dont need dates for previous year.
May be if you use this while statement:
While IterNo() <=12 and Year(AddMonths(date(Datefield),(-1) * IterNo(),'DD/MM/YYYY')) = Year(Today());
Also attaching the qvw you guys were working with.
HTH
Best,
Sunny