Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date & Time format

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.

4 Replies
tresesco
MVP
MVP

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

jagan
Luminary Alumni
Luminary Alumni

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.

MK_QSL
MVP
MVP

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
Anonymous
Not applicable
Author

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?

Difference between two dates

time difference in qlikview | Qlik Community

Date/time Difference

How to calculate the time difference between two different date?