How to calculate the day number of the year?

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

  • Kiran Support Team Lead
    Replied on October 30, 2020 at 3: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  Screenshot 10

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

    1604087046 5f9c6d0623af0  Screenshot 21

    Please see the demo form below:

    https://form.jotform.com/203035887995066

    Hope this information helps!