calculating days in year this far

bpdavis

Registered User.
Local time
Today, 05:31
Joined
Jun 15, 2001
Messages
11
I am trying to calculate the number of days so far in the current year, I used the function datediff("d",1-1,date()) and its returning a number like 37069. What am I missing? Thanks!
 
Use the "y" interval of the DatePart() function rather than calculating it yourself.

DatePart("y",Date())

will give you 179 for today if you type it in the immediate window preceeded by the "?" or "print".
 
I need something I could place in a text box control to pull it up, can I use that somehow? It didn't work when I pasted it.

[This message has been edited by bpdavis (edited 06-28-2001).]
 
The syntax for use in a form control is:

=DatePart("y",Date())

You should be able to cut and paste.
 

Users who are viewing this thread

Back
Top Bottom