Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Issue!!!!!

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

Labels (1)
12 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Try this

Date(Floor(DateField)) AS Date,

Time(Frac(DateField)) AS Time

MK_QSL
MVP
MVP

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

];

anbu1984
Master III
Master III

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 ];