cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Is there an inverse to the Day Of Year() function?

mwechtal
Level III

I have a day of year column, and need to convert it to a date. I've wracked my brain over this. There's probably a simple solution but it escapes me.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager


Re: Is there an inverse to the Day Of Year() function?

I assume you have a year column as well.

If so, you just need to multiply your Day of Year column by the number of seconds in a day (the In Days(1) function will give you this) and add it to the value for December 31 of the previous year. It sounds worse in prose than it really is.

:Day of Year * In Days(1) + Date DMY(31, 12, :Year - 1)

12394_JMPScreenSnapz027.png

12404_JMPScreenSnapz028.png

-Jeff

-Jeff

View solution in original post

2 REPLIES 2
Jeff_Perkinson
Community Manager Community Manager


Re: Is there an inverse to the Day Of Year() function?

I assume you have a year column as well.

If so, you just need to multiply your Day of Year column by the number of seconds in a day (the In Days(1) function will give you this) and add it to the value for December 31 of the previous year. It sounds worse in prose than it really is.

:Day of Year * In Days(1) + Date DMY(31, 12, :Year - 1)

12394_JMPScreenSnapz027.png

12404_JMPScreenSnapz028.png

-Jeff

-Jeff
mwechtal
Level III


Re: Is there an inverse to the Day Of Year() function?

Perfect! The data is all this year so far, so I don't need the year column yet.

Thanks! Yes that was simpler than I thought. I was getting frustrated, and I nearly did in in {shudder} Excel, but then I would have had to copy it back and forth every few days.