DatePart Function in Reverse!...

  • Thread starter Thread starter John Finch
  • Start date Start date
J

John Finch

Hi All

I have a problem in that I have inherited a database that holds the date
value as a dayofyear number. So December 25 would be = 360

I know that DatePart will find the dayofyear (eg datepart("y",#25/12/2008#)
would return 360)

Does anyone know how I can use the value 360 to find the date?

many thanks for your help.

John
 
Using DateAdd or DateSerial functions.

DateAdd("d",TheNumber-1,#1/1/2007#) The base date is the first day of the
year - whichever year you are using

DateSerial(2007,1,TheNumber)

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top