Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can any one help me to convert Date & Time format.
Few values are recognized as date & time. How to convert every thing to make into qlik readable format,
where I can use expressions like difference between 2 dates and between time.
Regards,
Pavan.
Date(Floor(Alt(Timestamp#(Call_Date, 'MM-DD-YYYY hh:mm:ss'),
Timestamp#(Call_Date, 'MM/DD/YYYY hh:mm:ss TT')))) AS Call_Date
Time(Frac(Alt(Timestamp#(Call_Date, 'MM-DD-YYYY hh:mm:ss'),
Timestamp#(Call_Date, 'MM/DD/YYYY hh:mm:ss TT')))) AS CallTime
Hi,
Try like this using Alt()
Alt(Timestamp#(Call_Date, 'Format1'), Timestamp#(Call_Date, 'Format2'), Timestamp#(Call_Date, 'Format3'))
Note: In the above replace Format1, Format2,.. with your timestamp formats.
Hope this helps you.
Regards,
Jagan.
TimeStamp(Alt(TimeStamp#(Call_Date,'DD-MM-YYYY hh:mm:ss'),TimeStamp#(Call_Date,'M/DD/YYYY h:mm:ss TT'))) as Call_DateTime, | |
Date(Floor(Alt(TimeStamp#(Call_Date,'DD-MM-YYYY hh:mm:ss'),TimeStamp#(Call_Date,'M/DD/YYYY h:mm:ss TT')))) as Call_Date, | |
Time(Frac(Alt(TimeStamp#(Call_Date,'DD-MM-YYYY hh:mm:ss'),TimeStamp#(Call_Date,'M/DD/YYYY h:mm:ss TT')))) as Call_Time |
Data which appears into left side is String....
To convert it into number do like this?
=date(date#(DateField,'DD/MMM/YYYY hh:mm'),'DD/MMM/YYYY hh:mm')
Similarly for your time replace date with Time or Timestamp.
For Difference b/w Date & Time, check this?
time difference in qlikview | Qlik Community
How to calculate the time difference between two different date?