Howdy: My employer puts a julian date on all reports. I need to be able to convert the julian to normal date. In order to get an accurate day count between the Julians. For example 2102 = the 102nd day of 2002, 9102 = the 102nd day of 1999.
Here's what I came up with, does anyone have a less cluncky way?
UPDATE DISTINCTROW root000 SET root000.date_gd = IIf([root000]![date]>'4000',DateSerial(Val('199' & Mid([root000]![date],1,1)),Month(Val(Mid([root000]![date],2,3))+1),Day(Val(Mid([root000]![date],2,3))+1)),DateSerial(Val('200' & Mid([root000]![date],1,1)),Month(Val(Mid([root000]![dcd],2,3))+1),Day(Val(Mid([root000]![date],2,3))+1)))
WHERE ((([root000]![date]) Not In (' ')));
The problem with this is that it works fine in the SQL view of the Query box. But if I paste it into the VBA and try to make an event out of it, it just keeps piling up different errors.
TIA: -- Rap
Here's what I came up with, does anyone have a less cluncky way?
UPDATE DISTINCTROW root000 SET root000.date_gd = IIf([root000]![date]>'4000',DateSerial(Val('199' & Mid([root000]![date],1,1)),Month(Val(Mid([root000]![date],2,3))+1),Day(Val(Mid([root000]![date],2,3))+1)),DateSerial(Val('200' & Mid([root000]![date],1,1)),Month(Val(Mid([root000]![dcd],2,3))+1),Day(Val(Mid([root000]![date],2,3))+1)))
WHERE ((([root000]![date]) Not In (' ')));
The problem with this is that it works fine in the SQL view of the Query box. But if I paste it into the VBA and try to make an event out of it, it just keeps piling up different errors.
TIA: -- Rap