Page 1 of 1

Day of Year example

PostPosted: Tue Jan 10, 2017 5:16 pm
by glenwf
I found some day of year information, but had trouble adapting it to exactly what I wanted. So here is an example that would have helped me.

Information. It is simple to subtract the first day of the year from another date and get a number, but if that is changed to an integer, it rounds up or down to the nearest integer so it was trickier than I expected.
Floor - truncates the number to an integer without changing it.
Date - this is the field that it is calculating
Mod - this function gives you the remainder of the date divided by 365.25 (not an integer to account for leap years).
1 has to be added, or Jan 1 = 0 and the last day is 364, not 365.

Re: Day of Year example

PostPosted: Tue Jan 10, 2017 6:57 pm
by curtterp
glenwf wrote:~SNIP~
Tried to upload the database file, but it says "The extension pdb is not allowed.". Guess I forgot how to add the file. Too bad... What was I doing wrong?

Zip the file up first, then you should be able to upload it to the forum :D