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: 
Anonymous
Not applicable

espoc date converstion to Qlik format

Hi I am currently loading Oracle data into Qlikview, I have a date field creation_date as

11052931376000
21052931469000
31052989210000
41052989493000
51052989855000
61052990059000

Now I want to convert this into human date field into YYYYMMDD format.

I am currently using "Timestamp(MakeDate(1970) + creation_date/60/60/24) as creation_date" but output is something like this

17/02/35303 17:13:20

I want it to be YYYYMMDD format, Please advise

Thanks for your help

16 Replies
Anonymous
Not applicable
Author

Thanks a lot..........

Anonymous
Not applicable
Author

Thanks Sunny

Anil_Babu_Samineni

From sunny, expression.

=Date(MakeDate(1970) + FieldName/60/60/24/1000,'YYYYMMDD')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs
Champion III
Champion III

Try with this

=Date(Timestamp(MakeDate(1970) + creation_date/60/60/24/1000),'YYYYMMDD')

sunny_talwar

I would suggest you to add Floor here also

Date(Floor(MakeDate(1970) + FieldName/60/60/24/1000),'YYYYMMDD') as Date

Anil_Babu_Samineni

Yes, Or else it consider as String due to MakeDate(). Thanks for prompt

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Or else it consider as String due to MakeDate().

What will be considered as string? The reason you need Floor is to remove the time component from this timestamp... String/Numbers has nothing to do with adding Floor. As long as you use date, it is a dual field with underlying numeric value