I have a Form that had the date I visited a field (over many years).
I want another field to tell me the number of the “day of the year”
I tried this where I gave a starting date (no year), and the field that holds the date of the visit.
DAYS(January 1;Visit Date)
Of course this doesn’t work. How do I do this?
You can use a calculation field with following formula: DATE([Visit Date]; "D")
DATE()
has many formatting options, luckily, day-of-the year is one of them. Here is the documentation http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns
-
This reply was modified 1 year, 6 months ago by Daniel Leu.
Glen, the DAYS() function will just give you the number of days between two dates. Daniel’s reply is what you want to use to get the day of the year.
That sounds good, but I don’t get any errors and no number shows up in the field.
The calculated is “Result Type” = number.
The filed is formated “decimal”, no decimals, – changed it to this after it was defalut “no style”.
What am I missing?
The return type for DATE()
is text.
OK, I’ve set the format to Text.
Am I missing something else. See attached.
Attachments:
You must be
logged in to view attached files.
Get rid of the square brackets [ ]
. That’s just for putting fields into the iOS version. The Mac version puts the fields as token buttons into the formula editor.
-
This reply was modified 1 year, 6 months ago by Brendan.
Thanks, that did it. I looked up the documentation for Day, and the associated links, but couldn’t understand the formatting using the ” ” etc. Very confusing.