Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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?

Labels (1)
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.