Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date in my database the format is
date |
---|
8/1/2013 01:00:58 am |
8/1/2013 01:13:58 am |
8/1/2013 01:20:58 pm |
i want convert these date in to 24 hrs when am fulling the into Qlikview can any one help me
how to wright a Time stamp for date column
Try this
Date(Floor(DateField)) AS Date,
Time(Frac(DateField)) AS Time
Load
Alt(
TimeStamp(TimeStamp#(Date,'D/M/YYYY hh:mm:ss tt'),'D/M/YYYY hh:mm:ss TT'),
TimeStamp(TimeStamp#(Date,'D/M/YYYY hh:mm:ss'),'D/M/YYYY hh:mm:ss TT'),
) as TimeStampDate,
Alt(
Date(Floor(TimeStamp#(Date,'D/M/YYYY hh:mm:ss tt'))),
Date(Floor(TimeStamp#(Date,'D/M/YYYY hh:mm:ss'))),
) as Date,
Alt(
TIME(FRAC(TimeStamp#(Date,'D/M/YYYY hh:mm:ss tt'))),
Time(FRAC(TimeStamp#(Date,'D/M/YYYY hh:mm:ss'))),
) as Time
Inline
[
Date
8/1/2013 01:00:58 am
8/1/2013 01:13:58 am
8/1/2013 01:20:58 pm
9/1/2013 13:10:10
10/1/2014 15:10:10
];
Load Date(Alt(Timestamp(Timestamp#(date,'d/m/yyyy hh:mm:ss tt')),Timestamp(Timestamp#(date,'d/m/yyyy hh:mm:ss'),'d/m/yyyy hh:mm:ss tt')),'d/m/yyyy'),
Alt(Time(Timestamp#(date,'d/m/yyyy hh:mm:ss tt')),Time(Timestamp#(date,'d/m/yyyy hh:mm:ss'),'hh:mm:ss tt'));
Load * Inline [
date
08/01/2013 01:00:58 PM
08/01/2013 01:13:58 AM
08/01/2013 13:20:58 ];