Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have one date field(Ldate) ,that i need to split into three i.e(LdateA, LdateB, LdateC)
My requirement is above three date field values should be in descending order.
For example- if i select any value in Ldate(20-08-2014) the corresponding values for four date value should be like this..(LdateA-21.08.2014, LdateB-22.08.2014, and LdateC-23.08.2014).
But in my case it is not showing in an order..For example----(LdateA-21.08.2014, LdateB-23.08.2014, and LdateC-22.08.2014).
I'm acheiving the above three dates from Ldate by using the below functions:
subfield(concat(DISTINCT(Ldate),',',Ldate),',',1) AS LdateA ,
subfield(concat(DISTINCT(Ldate),',',Ldate),',',2) AS LdateB ,
subfield(concat(DISTINCT(Ldate),',',Ldate),',',3) AS LdateC ,
Thanks in advance..
Hi Logesh,
Where are you trying to do this(in script or in chart/table)?
If possible, please attach sample qvw.
Thanks
Sabal
if you are just adding a day to the date, you can simply do it using the following:
Load
Ldate,
Date(Ldate+1) as LdateA,
Date(Ldate+2) as LdateB,
Date(Ldate+3) as LdateC,
...
from ...
;
make sure your DateFormat, TimeStampFormat and the dates you use are in the same format - for example, if your date is 20-08-2014, then DateFormat should be set as 'D-M-YYYY' and not 'D/M/YYYY'. otherwise, the above expressions won't work.