Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two dates: CreateDate and CloseDate and would like to calculate the age of the record that contains these two dates. My questions are:
Thanks.
Jeff
Hi Jeffrey,
Use below load script:
Let vStartDate = MM/DD/YYYY;
Let vEndDate = MM/DD/YYYY;
Data:
LOAD
StartDate,
EndDate,
($(DateDiff(StartDate>$ (vStartDate) , EndDate <=$(vEndDate))) AS AGE
FROM DataSource;
Hi Jeff,
May we can try this:
[TableName]:
Load *,
If(DayOpen<30,'<30',If(DayOpen<61,'31-60',If(DayOpen<121,'91-121',If(DayOpen>120,'>120')))) as [OpenBucket];
Load
ID,
Status,
CreateDate,
CloseDate,
Floor(Today()-CreateDate) as DayOpen;
Select ID, Status, CreateDate, CloseDate From TableName;
Regards,
Sokkorn