Day of Year example

For HanDBase related topics that are not specific to one platform.

Day of Year example

Postby glenwf » Tue Jan 10, 2017 5:16 pm

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.
(2.36 KiB) Downloaded 18 times
Last edited by glenwf on Tue Jan 10, 2017 7:07 pm, edited 1 time in total.
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: Day of Year example

Postby curtterp » Tue Jan 10, 2017 6:57 pm

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
Have a good day

I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests