Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NenadV
Creator
Creator

What is the easiest way to transform date stored as integer into the qlik date format?

In the source DB dates are stored as integers where the year 1 is 1900 and the format is the following : YYYMMDD (e.g. 1231231= 31.12.2023)

Thanks 

Labels (1)
1 Solution

Accepted Solutions
NenadV
Creator
Creator
Author

I've found it myself. In SQL select statement  I've used this

convert(date, concat('20', substring(str(DTIN65),5,2), substring(str(DTIN65),7,2), right(str(DTIN65),2))) tmpInvdate

and then in the load section this:

date(date#(tmpInvDate, 'YYYY-MM-DD')) as InvDate

View solution in original post

3 Replies
MatheusC
Specialist
Specialist

Hi, @NenadV 

See the solution in the topic below:

https://community.qlik.com/t5/QlikView-App-Dev/Converter-numero-em-data/td-p/759968

Regarts,
Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
NenadV
Creator
Creator
Author

thanks Matheus . My case is different.

For example, date 22.12.2023 is stored as 1231222

NenadV
Creator
Creator
Author

I've found it myself. In SQL select statement  I've used this

convert(date, concat('20', substring(str(DTIN65),5,2), substring(str(DTIN65),7,2), right(str(DTIN65),2))) tmpInvdate

and then in the load section this:

date(date#(tmpInvDate, 'YYYY-MM-DD')) as InvDate