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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Format

Hi,

I have a date field like 2016-01-27T19:04:00.251-06:00

i want to retrieve the time hh:mm:ss from this field.

Thank you

12 Replies
sunny_talwar

May be this:

=Time(Time#(Mid('2016-01-27T19:04:00.251-06:00', 12, 8), 'hh:mm:ss'), 'hh:mm:ss')

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

You can try using one of these statement:

=Subfield(SubField('2016-01-27T19:04:00.251-06:00', 'T', 2), '.', 1)

=mid('2016-01-27T19:04:00.251-06:00', 12, 😎

Anonymous
Not applicable
Author

Is there any another away?@sunny

Chanty4u
MVP
MVP

try this

T2:

LOAD * INLINE [

    a, dates

    aa, 2016-01-27T19:04:00.251-06:00

  

];

T1:

load *,

Timestamp(Timestamp#(dates,'2016-01-27T19:04:00.251-06:00'),'hh:mm:ss') as newdate

Resident T2;

Chanty4u
MVP
MVP

chk image timestmp.PNG

sunny_talwar

There might be, what is the issue with this way? If you can elaborate on the problem you are facing using this method, we might be able to provide alternate solutions

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

=textbetween('2016-01-27T19:04:00.251-06:00', 'T', '.')

Works also.

What is the reason why the mid statement cannot be applied?

Is there any limitations regarding Data?

Anonymous
Not applicable
Author

Its not working chanty

Anonymous
Not applicable
Author

Date format is not fixed