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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Day Number of year to date

Hi Community,

How do I convert day number of the year to a month, day date?  It shouldn't give me year and I don't want it too.

Regards,

Brandon

1 Solution

Accepted Solutions
swuehl
MVP
MVP

The QV function daynumberofyear() always uses years based on 366 days (leap years). So we can use e.g. this year to calculate the month and day. If you have a field containing the DayNumberOfYear called DNOY, try

LOAD

DNOY,

day(makedate(2012)-1+DNOY) as Day,

month(makedate(2012)-1+DNOY) as Month

FROM ...;

View solution in original post

1 Reply
swuehl
MVP
MVP

The QV function daynumberofyear() always uses years based on 366 days (leap years). So we can use e.g. this year to calculate the month and day. If you have a field containing the DayNumberOfYear called DNOY, try

LOAD

DNOY,

day(makedate(2012)-1+DNOY) as Day,

month(makedate(2012)-1+DNOY) as Month

FROM ...;