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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] Unix date to normal date (tmap)

I have a Unix date and want to convert it to a normale Date
for example: 13959.583 -> what will be 21.03.2008 13:59:31

can anyone help me?
Thanks Florian
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello
If the unix Dates is 13959.583, the really human date shoule be: 01.01.1970 04:52:39, you can convert it on website: http://www.epochconverter.com/
I wonder how do you convert it to 21.03.2008 13:59:31 with other tools or is there some relationship between 13959.583 and 21.03.2008 13:59:31?
Best regards

shong

View solution in original post

6 Replies
Anonymous
Not applicable

Hello
Using the following code:
new java.util.Date((long)(row1.unixDate*1000))

Input file:

13959.583
123451254
232012.2132

Result:
Starting job test at 11:17 09/04/2009.
.-------------------.
| tLogRow_1 |
|=-----------------=|
|date |
|=-----------------=|
|01.01.1970 11:52:39|
|30.11.1973 04:00:54|
|04.01.1970 00:26:52|
'-------------------'
Job test ended at 11:17 09/04/2009.

Best regards

shong
_AnonymousUser
Specialist III
Specialist III
Author

Hello, thanks for that help, my Unix date is a float, can you help me please?
It's called SOLL_START Type: float length: 15 precision:10
It is possible to convert that to Double
Anonymous
Not applicable

Hello friend
You only need to select fload to replade double when defining the schema.
Best regards

shong
Anonymous
Not applicable

That are my Unix Dates in float:
13959.583
13964.261
13958.415
And that is, what I get as date:
01.01.1970 04:52:39
01.01.1970 04:52:44
01.01.1970 04:52:38
And it should be:
21.03.2008 13:59:31
26.03.2008 06:15:50
20.03.2008 09:57:36
So, I need some help please
Thanks Florian
Anonymous
Not applicable

Hello
If the unix Dates is 13959.583, the really human date shoule be: 01.01.1970 04:52:39, you can convert it on website: http://www.epochconverter.com/
I wonder how do you convert it to 21.03.2008 13:59:31 with other tools or is there some relationship between 13959.583 and 21.03.2008 13:59:31?
Best regards

shong
Anonymous
Not applicable

Ok, I asked a developer at my company and he had a java class for me, so thanks for your help