Discussion Board for collaboration related to Creating Analytics for QlikView.
I have a question regarding the changing of integer to date.
From the database I have integers, but I can not get the right date out of it.
I've read quite a few posts already, but none helped me solve my issue.
Two examples from my database and value in Qlikview:
in database and wanted date in Qlikview: 08-02-2014 10:35:32
integer in Qlikview: 1391852132
in database and wanted date in Qlikview: 01-07-2011 11:41:46
integer in Qlikview: 1309513306
I would like help or a blogpost to help me solve this issue.
I do not need the time, but I might be helpful to understand why the integer returns this value
Thank you in advance.
Go to Solution.
I think I found the answer in How to get date from integer format
I used Date(MakeDate(1970,01,01) + MyDate / 24 / 60 / 60) to solve it.
Looks like it's working
The difference between the two dates is 2 years, 7 months, 6 days, 22 hours and 54 minutes.
The difference (in integer) is 82.338.826
I calculated 2 years, 7 months, 6 days, 22 hours and 54 minutes in seconds and this is roughly 82.250.000
Can it be my database returns the date in seconds?
it seems your number is in seconds starting from 1970-01-01 (Unix epoch ?)
with this expression
= date((1391852132 / ( 60*60*24)) + Date#('01-01-1970', 'DD-MM-YYYY'), 'DD-MM-YYYY hh:mm:ss')
It is the Unix Timestamp.