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: 
Neeraja005
Contributor II
Contributor II

Extract timestamp from timezone

Hello People,

I have a timezone format stored in my Dynamo db: " 2019-12-05T13:30:24.314Z"

I want to convert it to a timestamp and calculate the response time between two different timestamps.

Can someone help me with this conversion? I am new to Qliksense scripts and time formats and unable to figure it out.

Thanks in Advance

Regards,

Neeraja Upadrasta

Labels (2)
1 Solution

Accepted Solutions
Neeraja005
Contributor II
Contributor II
Author

Thank you for the quick reply I could use the timestamp to extract timezone as timestamp and then used the time to calculate response time.

time(timestamp(timestamp#("Date_Field")))  as "preffered_name"

View solution in original post

3 Replies
Taoufiq_Zarra

@Neeraja005 

if timestamp# not working you can format your field as :

=timestamp#(subfield(subfield(Field,'T',2),'Z',1),'hh:mm:ss.FFF')

 

then you can apply time function, for example to exatrct hour :

=hour(timestamp#(subfield(subfield(Field,'T',2),'Z',1),'hh:mm:ss.FFF')) return

Taoufiq_Zarra_0-1614592592624.png

you can also use interval or ...

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
MayilVahanan

Hi @Neeraja005 

Try like below

Timestamp(Timestamp#('2019-12-05T13:30:24.314Z','YYYY-MM-DDTHH:mm:ss.fff'),'YYYY-MM-DD HH:mm:ss')

-- Convert into timestamp format

=Hour(Timestamp(Timestamp#('2019-12-05T13:30:24.314Z','YYYY-MM-DDTHH:mm:ss.fff'),'YYYY-MM-DD HH:mm:ss'))

gives 13

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Neeraja005
Contributor II
Contributor II
Author

Thank you for the quick reply I could use the timestamp to extract timezone as timestamp and then used the time to calculate response time.

time(timestamp(timestamp#("Date_Field")))  as "preffered_name"