julian date conversion query

V

vic

Does anyone know the routine for converting a julian date
field to a standard date field such as dd/mm/yy or
mm/dd/yyyy?
 
J

John Spencer (MVP)

Gived an example of what your julian date looks like and what it should convert
to. Is it stored in a string field, or is it in two fields, one for the year
and one for the day?

Assuming that you only have the day number and no year; 123
DateSerial(Year(Date()),1,NumberofDays)

Assuming two character year and 3 character days and all years are in the 21st century
DateSerial(2000 + Val(Left(JulianDate,2)),1,Mid(JulianDate,3))

Assuming four character year and 3 character days and all years are in the
21st century
DateSerial(Val(Left(JulianDate,5)),1,Mid(JulianDate,5))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top