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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fixing timestamp

Hi,

I'm getting a timestamp in the format below.

2014-03-01T00:01:01-0000

Does anyone know how to re-write this to one long string?

I was able to break it down per below into two separate strings but I would like to make it as one - MM/DD/YYYY hh:mm:ss

Timestamp#(date(date#(left(@1, 10), 'YYYY-MM-DD'), 'MM/DD/YYYY')) as [Date UTC],

  Timestamp#(date(date#(mid(@1, 12,8), 'hh:mm:ss'), 'hh:mm:ss')) as [Time UTC],

 

Can anyone help? I don't think Qlikivew recognizes the format?

Labels (1)
10 Replies
Not applicable
Author

Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'MM/DD/YYYY hh:mm:ss')) as [Date UTC],

  Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'YYYY')) as [Year UTC],

  Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'MM')) as [Month UTC],

  Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'DD')) as [Day UTC],

  Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'hh')) as [Hour UTC],

  Timestamp#(date(date#(Replace(Left(@1, 19), 'T', ' '), 'YYYY-MM-DD hh:mm:ss'), 'mm')) as [Minute UTC],