Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

Convert date time and timezone

How do you convert below to date & time separately.

2017-11-20T01:30:00-05:00

Output:

Date: 2017-11-20

Time: 01:30

Thanks

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I will go with this?

Date = Left('2017-11-20T01:30:00-05:00' ,10)

Time = Left(SubField('2017-11-20T01:30:00-05:00' ,'T', -1), 5)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

I will go with this?

Date = Left('2017-11-20T01:30:00-05:00' ,10)

Time = Left(SubField('2017-11-20T01:30:00-05:00' ,'T', -1), 5)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Or, Simplest way to achieve

=Date(Timestamp(ConvertToLocalTime('2017-11-20T01:30:00-05:00')), 'YYYY-MM-DD')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

For Date do this way

=Date(Left('2017-11-20T01:30:00-05:00',10))

For Time do this way

=Time( Mid('2017-11-20T01:30:00-05:00',12,5))