Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Convert number to Timestamp

Hi all,

I want to convert a field from number to Timestamp.

Eg:

201710112044  -    10/11/2017 08:44:00 PM (or) 10/11/2017 20:44:00


I'm fetching it from AS400 DB.

How do i do that in DB/QlikView?


Any help is highly appreciated!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe

LOAD Timestamp(Timestamp#(YOURFIELD,'YYYYMMDDhhmm'),'MM/DD/YYYY hh:mm:ss TT') as TIMESTAMP,

     ...

View solution in original post

8 Replies
swuehl
MVP
MVP

Maybe

LOAD Timestamp(Timestamp#(YOURFIELD,'YYYYMMDDhhmm'),'MM/DD/YYYY hh:mm:ss TT') as TIMESTAMP,

     ...

markgraham123
Specialist
Specialist
Author

Stefan,

How can do the same from DB?

Please advise.

sunny_talwar

May be this

TimeStamp(TimeStamp#(FieldName, 'YYYYMMDDhhmm'), 'MM/DD/YYYY hh:mm:ss TT')

or

TimeStamp(TimeStamp#(FieldName, 'YYYYMMDDhhmm'), 'MM/DD/YYYY hh:mm:ss')

markgraham123
Specialist
Specialist
Author

How can do the same from DB?

Please advise.

sunny_talwar

Do it in the preceding load because I am not sure why DB you have and the syntax sometimes vary by databases

sunny_talwar

I guess you did mention that the database is AS400 DB... but I am not familar with the syntax on the db side

markgraham123
Specialist
Specialist
Author

I'm doing it in Preceeding load. It worked.

Thanks brother!

markgraham123
Specialist
Specialist
Author

This worked!

Thank you