Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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"
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
you can also use interval or ...
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
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"