Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
\
I am calculating the days but am getting the wrong out output
Load *,
num(Date#('07/19/2017','MM/DD/YYYY'))-num(Date#(OpenDate,'MM/DD/YYYY')) as [Open Days]
num(Date#('07/19/2017','MM/DD/YYYY'))-num(Date#(Update Time,'MM/DD/YYYY')) as [Last Updated Days]
If [Open Date] is the format of DD/MM/YYYY then try like below
MakeDate(2017, 07, 19) - Date([Open Date], YYYY-MM-DD) as [Open Days],
MakeDate(2017, 07, 19) - [Update Time] as [Last Updated Days];
convert '7/19/2017' to date format
Data:
Load *, Date(date#('7/19/2017','MM/DD/YYYY'))-[Open Date] as [Open Days],
Date(date#('7/19/2017','MM/DD/YYYY'))-[Update Time] as [Last Updated Days];
its not working same result came
My expressions may frequent to you. Will you check?
this is also not giving anil
May be share sample data in excel?
Try using this expression
LOAD
Open_Date,
Update_Date,
DayNumberOfYear(Date('01/03/2017','DD/MM/YYYY') - Date(Open_Date,'DD/MM/YYYY')) as Open_Days
FROM
You_Table
Hope This helps.
Data:
Load *,
Date(date#('7/19/2017','MM/DD/YYYY'),'MM/DD/YYYY')-Date([Open Date],'MM/DD/YYYY') as [Open Days],
Date(date#('7/19/2017','MM/DD/YYYY'),'MM/DD/YYYY')-Date([Update Time],'MM/DD/YYYY') as [Last Updated Days];