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: 
rcandeo
Creator III
Creator III

Conveting a date

Hi, I need that the result of the code above be like this: '2001/02', but it's bringing me '2001/2'


year(today())&'/'&num(month(today()))


How can I fix that please?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Robson,

That's because of the Num() function, as in numbers, a leading zero doesn't make the difference. Try instead

Date(Today(), 'YYYYMM')


Hope that helps.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello Robson,

That's because of the Num() function, as in numbers, a leading zero doesn't make the difference. Try instead

Date(Today(), 'YYYYMM')


Hope that helps.

spividori
Specialist
Specialist

HI.

Try the following:

date(monthstart(today()),'YYYY/MM')

Regards.