# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

## Integer to date

Hello,

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:

1)

in database and wanted date in Qlikview: 08-02-2014 10:35:32

integer in Qlikview: 1391852132

2)

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

Kind regards,

Erwin

1 Solution

Accepted Solutions
Not applicable

## Re: Integer to date

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

4 Replies
Not applicable

## Re: Integer to date

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?

Not applicable

## Re: Integer to date

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

MVP

## Re: Integer to date

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')

result is

08-02-2014 09:35:32

Contributor III

## Re: Integer to date

It is the Unix Timestamp.

http://community.qlik.com/ideas/2517