Is there a formula to calculate the day of the year?

Example: Today, 3/18/2015 is the 77th day of 2015.

John McGarvey shared this idea · Mar 18, 2015

Is there a formula to calculate the day of the year?

Example: Today, 3/18/2015 is the 77th day of 2015.

John McGarvey shared this idea · Mar 18, 2015

## Comments

2 comments

Kimberly commented ·Hello John,

You could accomplish this using a modified datedif() formula. You can determine the first of every year with the following formula:

year({Date})&"/"&"01"&"/"&"01"

This will extract the year of your date field, then concatenate the first month and first day of the year so the output would look as follows: YYYY/MM/DD.

You would then insert this as the Start Date in a datedif() function. Because this function returns a number between two dates, you would need to add one to the final result. The end result might look similar to:

datedif({Date}, year({Date})&"/"&"01"&"/"&"01", "d")+1

Hopefully this helps! Please let us know if you run into further issues.

Thank you,

Kim

John McGarvey commented ·Thanks Kim - works perfectly.

Please sign in to leave a comment.