julian dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Wondered if someone could help me. I am currently learning VB in Access and am trying to to set up a procedure to do the following
to read dates from a General Date field (i.e., 01/01/2004 00:00:01) in an access tabl
convert them to a yynnn julian date format (I realise this is not the true julian date format
and write them into the tabl

Any help would be much appreciated

Damia
 
Why write them to a table? You've already got the date there. Whether it's
2004-05-15 or 04136, it's still the same date.

DatePart("y", MyDate) will give you what day of the year it is (your nnn).
For that matter, so will Format(MyDate, "y") and you can use Format(MyDate,
"yyy") to get the 2 digit year followed by that number. Unfortunately,
Format(MyDate, "yyy") won't use 3 digit for nnn. To get that, try:

Format(MyDate, "yy") & Format(DatePart("y", MyDate), "000")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


lidgardd said:
Hi,

Wondered if someone could help me. I am currently learning VB in Access
and am trying to to set up a procedure to do the following:
 
Back
Top