bpdavis
06-28-2001, 08:40 AM
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!
|
View Full Version : calculating days in year this far bpdavis 06-28-2001, 08:40 AM 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! Pat Hartman 06-28-2001, 09:58 AM 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". bpdavis 06-28-2001, 11:01 AM 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).] Pat Hartman 06-29-2001, 05:37 AM The syntax for use in a form control is: =DatePart("y",Date()) You should be able to cut and paste. |