B bpdavis Registered User. Local time Today, 05:31 Joined Jun 15, 2001 Messages 11 Jun 28, 2001 #1 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!
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!
P Pat Hartman Super Moderator Staff member Local time Today, 00:31 Joined Feb 19, 2002 Messages 46,938 Jun 28, 2001 #2 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".
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".
B bpdavis Registered User. Local time Today, 05:31 Joined Jun 15, 2001 Messages 11 Jun 28, 2001 #3 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).]
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).]
P Pat Hartman Super Moderator Staff member Local time Today, 00:31 Joined Feb 19, 2002 Messages 46,938 Jun 29, 2001 #4 The syntax for use in a form control is: =DatePart("y",Date()) You should be able to cut and paste.