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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
renri
Contributor II
Contributor II

1640673286 convert to date time

how can I convert to date time by function for 1640673286

1 Solution

Accepted Solutions
Vegar
MVP
MVP

I assume this is an UNIX formated time, the number of seconds since January 1th 1970. 

Try converting it to a Qlik recognised  date by using this function. 

=TimeStamp(MakeDate(1970,1,1) + [Your datetime field]/24/60/60) as [Your timestamp]

or even simpler

=TimeStamp(MakeDate(1970) + [Your datetime field]/86400) as [Your timestamp]

View solution in original post

4 Replies
Chanty4u
MVP
MVP

try this way

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

 

or

 

It would be better to split your timestamp filed into two separate date and time fields as this will use less memory in the app.

 

date(date#( 'Field' , 'YYYYMMDDhhmmss'), 'DD.MM.YYYY')  as date

time(date#( 'Field' , 'YYYYMMDDhhmmss'), hh:mm:ss) as time

Vegar
MVP
MVP

I assume this is an UNIX formated time, the number of seconds since January 1th 1970. 

Try converting it to a Qlik recognised  date by using this function. 

=TimeStamp(MakeDate(1970,1,1) + [Your datetime field]/24/60/60) as [Your timestamp]

or even simpler

=TimeStamp(MakeDate(1970) + [Your datetime field]/86400) as [Your timestamp]

renri
Contributor II
Contributor II
Author

This method is prefect. Thanks.

renri
Contributor II
Contributor II
Author

1640673286 is a UNIX timestamp,I didn't succeed in this method.Thanks.best wish for you.