Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to calculate the max of the time stamps I am getting form the db.
can anyone please help me to convert the time stamp so that I can calculate max on it.Max seems not to be working on this format
Try using Timestamp#() to interpret your values:
=Max(Timestamp#('19-Sep-16 06.55.31.000000385 PM','DD-MMM-YY hh.mm.ss.fff TT'))
returns
42632.788553241
Thanks a lot for your helpful reply Stefan.
Actually I was trying to figure out the max date and have also used that to compare with the latest_update_date
the where clause is like this
FROM Table1 where (Date(Date#((Left([Datefield],18)),'DD-MMM-YY hh.mm.ss'),'DD-MMM-YY hh.mm.ss'))> $(last_Updated_Date) ;
but the script is not able to compare and throwing error.
the last updated date field snippet is as below
Last_Updated_Date:
Load
max(Date(Date#((Left([Datefield],18)),'DD-MMM-YY hh.mm.ss'),'DD-MMM-YY hh.mm.ss')) as MaxDate
Resident MasterData;
let last_Updated_Date= Peek('MaxDate',0,'Last_Updated_Date');
If I hardcode the date the script is working.Can you help me to figure what I am doing wrong.
You can try MaxString
Maybe your variable replacement needs to be enclosed in single quotes:
... > '$(last_Updated_Date)' ;
Or create a number to compare your input values to:
let last_Updated_Date= Num(Peek('MaxDate',0,'Last_Updated_Date'),'#.#','.',',');
Hi @swuehl ,
Hope u are doing Great !!
Need some help for same scenario, I have TimeStamp in excel MMM DD YYYY hh:mm:ss:fff TT
and I want to take max from those dates and show it in the format MM-DD-YYYY hh:mm:ss
Already tried as per your code also but seems I am missing something, please help.
Rgds,
Shubham