Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

i'm stuck..

how do I convert this from a CSV  .. into a QV timestamp... while loading the CSV and converting it to local time..

2011-11-17T13:12:27.654+00:00

Notice the T between DATE and TIME and the UTC indicator (+00:00)

I'm crosseyed with LOAD statments....

thanks so much for helping!

1 Solution

Accepted Solutions
Not applicable
Author

ok - got the "simplest" solution. Just needed 2 x kick in the back..

thanks

Solution:

ConvertToLocalTime(timestamp#(SubField(Replace([time (UTC)],'T',' '),'+',1),'YYYY-MM-DD hh:mm:ss[.fff]')) as TimeX

(Time(UTC) is the field name) = to the engineers vision of a time stamp listed above. 🙂


View solution in original post

3 Replies
RedSky001
Partner - Creator III
Partner - Creator III

something like this should do it.

Time(SubField( Replace('2011-11-17T13:12:27.654+00:00','+','T')     ,'T',2)     ,'hh:mm:ss')

swuehl
MVP
MVP

Are all your values UTC based?

Then maybe like this:

Let TZD= time(localtime()-localtime('GMT'));

Input:

LOAD * INLINE [

Input

2011-11-17T13:12:27.654+00:00

];

LOAD Timestamp(timestamp#(left(replace(Input,'T',' '),index(Input,'+')-1),'YYYY-MM-DD hh:mm:ss.fff')+'$(TZD)') as result

resident Input;

Not applicable
Author

ok - got the "simplest" solution. Just needed 2 x kick in the back..

thanks

Solution:

ConvertToLocalTime(timestamp#(SubField(Replace([time (UTC)],'T',' '),'+',1),'YYYY-MM-DD hh:mm:ss[.fff]')) as TimeX

(Time(UTC) is the field name) = to the engineers vision of a time stamp listed above. 🙂