Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
brijesh1991
Partner - Specialist
Partner - Specialist

Date format issue

How to convert Date format : yymmdd into dd/mm/yyyy???

Your ideaes are highly appreciated. . .


Thanks and Regards,

Brijesh

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Use upper format codes:

Date#('110425', 'YYMMDD')

'mm' is for minutes..

- Ralf

Astrato.io Head of R&D

View solution in original post

4 Replies
datanibbler
Champion
Champion

Hi Brijesh,

I know of two ways:

- You could set the date_format you want on the "Main" tab of the script - or set it just before that code and reset it afterwards or wherever

- You could use the DATE# function - that would probably have to look like this:

>>> Date(Date#, [field], 'yyyymmdd'), [required_format]) as ... <<<

The DATE# function just takes the data that  comes from your data_source and interprets as a date - that format_parameter is the format in which it comes - and automatically makes it the internally used numeric - then you can go and format it in whatever date_format you want to have displayed.

HTH

Best regards,

DataNibbler

brijesh1991
Partner - Specialist
Partner - Specialist
Author

Hey DataNibbler thanks. . .

But if my date is 110425 then it should be converted to 25/04/2011.

First two digits year, next two digits month and last two digits day.

So you mean to say if I will use this:: Date(Date#('110425', 'yymmdd'),'DD/MM/YYYY') 

then Date should be 25/04/2011 ideally!

But qlikview gives : 25/01/2011

rbecher
MVP
MVP

Use upper format codes:

Date#('110425', 'YYMMDD')

'mm' is for minutes..

- Ralf

Astrato.io Head of R&D
brijesh1991
Partner - Specialist
Partner - Specialist
Author

Thanks Ralf. . .

It worked!!!