Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date settings

Hi,

In a database, I have the following date format that I can not convert to 'dd-mm-yyyy ".

example:

Last_udated_date
1382623150
1391500439
1391500540
1391500803

Who has an idea?

Best regards,

Arjan

1 Solution

Accepted Solutions
luis_pimentel
Partner - Creator III
Partner - Creator III

Try

In QlikView script a possible implementation to convert from a Unix timestamp to the local time could be:

Timestamp = ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (<timestamp_field> / 86400)), '<time_zone>')

or

Timestamp = ConvertToLocalTime(Date(25569 + (<timestamp_field> / 86400)), '<time_zone>')

View solution in original post

6 Replies
MayilVahanan

Hi

Can you say, which format is in database?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
luis_pimentel
Partner - Creator III
Partner - Creator III

That looks like Unix Time Format (based on seconds since standard epoch of 1/1/1970)

1391500803 = Tue, 04 Feb 2014 08:00:03 GMT

Anonymous
Not applicable
Author

Mysql database Mantis bugtraking

Van: Mayil Vahanan Ramasamy

Verzonden: dinsdag 4 februari 2014 11:22

Aan: Arjan IJlenhave

Onderwerp: Re: - Date settings

Qlik Community<http://community.qlik.com/>

Date settings

reply from Mayil Vahanan Ramasamy<http://community.qlik.com/people/MayilVahanan?et=watches.email.thread> in Scripting - View the full discussion<http://community.qlik.com/message/461463?et=watches.email.thread#461463>

agilos_mla
Partner - Creator III
Partner - Creator III

It is the unix date format please convert like this :

QV Date = 25569 + <UnixDate> / 86400

Michael

luis_pimentel
Partner - Creator III
Partner - Creator III

Try

In QlikView script a possible implementation to convert from a Unix timestamp to the local time could be:

Timestamp = ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (<timestamp_field> / 86400)), '<time_zone>')

or

Timestamp = ConvertToLocalTime(Date(25569 + (<timestamp_field> / 86400)), '<time_zone>')

Not applicable
Author

A QV date should be around 40,000

since the calendar starts from 31DEC1899, 00:00:00

Fabrice