How to calculate the day number of the year?

  • Profile Image
    CPCForms
    Asked on October 30, 2020 at 12:14 PM

    Do you have an option to return the day number of the year?

    Day number of the year today is 303. Day number is indicating the number of the current (today's) day of the year. Day of the year (DOY) number is between 1-365 or 1-366 according to if the current year is a leap year or not. This year 2020 is a leap year and there are 366 days.

  • Profile Image
    Kiran
    Answered on October 30, 2020 at 03:45 PM

    You may add two date fields on the form and set one date field with 01-01-2020 and the other field with the current date field.

    1604086882_5f9c6c6260509_

    You may add a calculation field to calculate the difference of both dates.

    1604087046_5f9c6d0623af0_

    Please see the demo form below:

    https://form.jotform.com/203035887995066

    Hope this information helps!