MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How To Determine the Day Of the Year and the Remaining Days In the Year?

Can Numbers determine the current day of the year and the remaining days in the year for a given date?

Example

A2 = 06/01/2021

B2 = 152 (day of the year based on cell A2)

C2 = 213 (remaining days in the year based on cell A1)
—–
Jessica

Comments: One Response to “How To Determine the Day Of the Year and the Remaining Days In the Year?”

    3 years ago

    You can add and subtract dates and the result will be a duration. So to get the day-of-year number, just start with the date and subtract the first of the year and add one. So in B2 you could do:

    =A2-"1/1/2021"+1

    To get the number of days until the end of the year, you could do:

    ="12/31/2021"-A2

    If you'd rather have a year that always matches the year of the original date, you could use DATE to construct it.

    =A2-DATE(YEAR(A2),12,31)
    =DATE(YEAR(A2),1,1)-A2+1

    And if you'd rather have the number represented as an integer than a duration, you can convert with DUR2DAYS.

    =DUR2DAYS(A2-DATE(YEAR(A2),12,31))
    =DUR2DAYS(DATE(YEAR(A2),1,1)-A2+1)

Comments Closed.