Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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
MVP
MVP

Convert Day Number of year to date

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 ...;

1 Reply
MVP
MVP

Convert Day Number of year to date

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 ...;

Community Browser