Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Not applicable

Convert specific number to date format

Hi,

I have a particular dimension (called period) wich consists of a number of 4 digits: 1625. The first two (16) represents the year, and the last two represents the week of the year (25).

Is there any possible way to convert this number of four digits in a date format? So I could use date attributes like AddMonths(), AddYears() or Months()...

I'm looking for a way similar when you want to convert timestamps into date format using Date(‹number›, ‹format›), only that my initial number is not a timestamp.

Thank you for your help in advance.

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Convert specific number to date format

May be

MakeWeekDate('20'&Left(Text(period),2),Right(Text(period),2))

Regards,

Antonio

2 Replies
antoniotiman
Honored Contributor III

Re: Convert specific number to date format

May be

MakeWeekDate('20'&Left(Text(period),2),Right(Text(period),2))

Regards,

Antonio

Not applicable

Re: Convert specific number to date format

Thank you Antonio!

It works perfectly! Just what I was looking for.