Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a new table which will give me all the dates from 01/01/2014- to today's dates.
Hi,
maybe like this:
...
newtable:
LOAD Date(MakeDate(2014)+RecNo()-1) as Date
AutoGenerate Today()-MakeDate(2014)+1;
hope this helps
regards
Marco
Just to add another option, you can do this:
NewTable:
LOAD Date(MakeDate(2014)+IterNo()-1) as Date
AutoGenerate 1
While IterNo() <= Today() - MakeDate(2014) + 1;
Hi Marco/Sunny,
It was very helpful.Could you please explain the working of the code.?
Thanks,
Ankit
Hi sunny ,
Can you please let me know how can I change al the dates to YYYY-MM-DD format,I am getting dates in mm/dd/yyyy format.
Hi Marco,
Can you please let me know how can I change al the dates to YYYY-MM-DD format,I am getting dates in mm/dd/yyyy format.
Hi,
either change your DateFormat variable accordingly or use a format string in the Date() function:
LOAD Date(MakeDate(2014)+RecNo()-1,'YYYY-MM-DD') as Date
AutoGenerate Today()-MakeDate(2014)+1;
hope this helps
regards
Marco
Hi Ankit,
Just add the below code into your script. and create a list box to view the result
[New table]:
load date(MakeDate(2014)+IterNo(),'MM/DD/YYYY') as date
AutoGenerate 1
While IterNo()<=Today()-MakeDate(2014)+1;
You need this
date(date#(MakeDate(2014)+IterNo(),'MM/DD/YYYY'),'yyyy-mm-dd') as date
Please close this thread using flag of helpful or correct answer which you sit the perfect
And I recommend please read all dates in qlikview