Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have written a simple script wherein I am generating dates.
LOAD Date;
LOAD Date(($(vStartDate) + RecNo()),'MM/DD/YYYY') as Date
AutoGenerate vEndDate - vStartDate;
After running the script, the Date field contains values from 12/31/1899 to 12/29/1900.
However, I wish to generate all the dates between 1/1/2017 to 12/31/2017. Can someone please help me as to where I am going wrong.
Thanks,
Asma
Hi convert them to number.
Let vStartDate = num(makedate(2017,1,1,));
Let vEndDate = num(makedate(2017,12,31));
Regards,
Kaushik Solanki
Hi,
Make sure that the vStartDate variable has got the correct date in number format.
Regards,
Kaushik Solanki
Hey, could you show what vStartdate contains?
May be it is problem with the format of your variable
I have created start date and end date variables s:
LET vStartDate = MakeDate(2017,1,1);
LET vEndDate = MakeDate(2017,12,31);
Hi convert them to number.
Let vStartDate = num(makedate(2017,1,1,));
Let vEndDate = num(makedate(2017,12,31));
Regards,
Kaushik Solanki
Thanks Kaushik for the solution!
Can someone please as to why the below code returns only value 01/01/2017 in Date field.
LOAD Date,
Month(Date) as Month,
Year(Date) as Year;
LOAD Date($(vStartDate) + RowNo(),'DD/MM/YYYY') as Date
AutoGenerate vEndDate - vStartDate;