Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
aniruddhyadutta
Creator
Creator

Date time conversion

Hi All,

My data base is returning time in this format

Capture.PNG

can anyone help me to convert this into day ,hours(24hrs format),min parts as individual fields.

5 Replies
aniruddhyadutta
Creator
Creator
Author

Hi,

greetings for the day to all!!

can anyone help me on this issue?

Thanks

Aniruddhya

Miguel_Angel_Baeyens

Hi Aniruddhya,

I'm using the Date() function and templates from memory but it should be very similar to this:

Date(Date#(Field, 'DD-MMM-YY hh.mm.ss.fffffffff TT')) AS Date

Miguel

Anonymous
Not applicable

Hi,

Please check the below code,

DateTbl:

Load * Inline [

TempDate

01-Oct-16 01.00.13.000000440PM

];

NoConcatenate

DateFormatTbl:

LOAD Date(Date#('01-Oct-16 01.00.13.000000440 PM', 'DD-MMM-YY hh.mm.ss.fffffffff TT'),'M/D/YYYY h:mm:ss[.fff]') as TempDate

Resident DateTbl;

DROP Table DateTbl;

Calendar:

LOAD Date(TempDate) as SampleDate,

  Month(TempDate) as SampleMonth,

  Year(TempDate) as SampleYear,

  Hour(TempDate) as SampleHour,

  Minute(TempDate) as SampleMinute

Resident DateFormatTbl;

DROP Table DateFormatTbl;

Regards,

Leni Balakrishnan

aniruddhyadutta
Creator
Creator
Author

Thanks  a lot it worked!!

aniruddhyadutta
Creator
Creator
Author

Hi leni,

Thanks for your detailed reply.the format you mentioned also worked for me..:)