Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Date to Julian Date 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
Hello, I am using Access 2003 and the following VBA code to convert todays date into Julian date. But this keeps producing the Julian date of: 1999364 no matter what the actual date is.

Function DateToJulian(ByVal dateval): DateToJulian = Year(dateval) * 1000 + DatePart("y", dateval): End Function

Function StartUp()

intJToday = DateToJulian(Today): DateCode = Mid(intJToday, 3, 5)

Any ideas or suggestions please. Thank you.
 
The function for the current date is "Date()" ... not "Today
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top