F
fdnyfish via AccessMonster.com
I have a number "312" and I know it's year 2007. How do I figure convert 312
to the 312th day of 2007?
to the 312th day of 2007?
With the year and the day number, what you have is a Julian date. Here is a
function that will convert a Julian date to a serial date:
Public Function JulianToSerial(lngJulianDate As Long) As Date
Dim serialdate As Date
JulianToSerial = DateSerial(((Year(Date) \ 10) * 10) + Int(lngJulianDate
/ 1000), 1, lngJulianDate Mod 1000)
End Function
I have a number "312" and I know it's year 2007. How do I figure convert 312
to the 312th day of 2007?
John W. Vinson said:I have a number "312" and I know it's year 2007. How do I figure convert 312
to the 312th day of 2007?
Klatuu's code may be overkill for this case: you can put a calculated field in
a Query
TheDate: DateSerial(Year(Date()), 1, [yournumberfield])
John W. Vinson [MVP]