Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

May be

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

Regards,

Antonio

View solution in original post

2 Replies
antoniotiman
Master III
Master III

May be

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

Regards,

Antonio

Not applicable
Author

Thank you Antonio!

It works perfectly! Just what I was looking for.