Tips.gif (2048 bytes)

 

 

 

 

 

Convert Julian to Date in Microsoft Access

This formula in Access Query or SQL Macro (select macros, then Run SQL)

is typically used in an update statement, update one field from another field

UPDATE TEST set NewShpDate= Cdate(Format(((DateValue("01/01/"+LTrim(Str(1900+Int([SDaddj]/1000))))+[SDaddj]-Int([SDaddj]/1000)*1000))-1,"mm-dd-yy"))

This updates NewShpDate (a text field) from SDaddj, the ship date field for JDE, also a text field

Sddadj looks like this: 102031  (Jan 31, 2002)

Test is the name of the table that holds Sddadj and NewShpDate.

Remember, this SQL statement works in Access. It will NOT work in AS/400 SQL.