julian day

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hello All

I would like to have the current julian day on my report. Is it possible
to do this? I've looked in built in functions under date/time but did not
find julian day. Is it listed under a different catagory?

Thanks in advance.
David
 
Assuming your definition of Julian day is the number of the day out of 365
or 366, try DatePart("y", Date()) or Format(Date(), "y")
 
David said:
I would like to have the current julian day on my report. Is it possible
to do this? I've looked in built in functions under date/time but did not
find julian day. Is it listed under a different catagory?


The format code Y will display the day of the year.

Format(#5/27/2005#,"y") will display 147
Format(#5/27/2005#,"yyy") will display 05147
Format(#5/27/2005#,"yyyyy")) will display 2005147

Does any one of those do what you want?
 
Thanks Marshall and Douglas for your quick response. Actually I am looking
for something like this for today as an example but being updated everyday
I open the report. 0155, 015 being the julian day and 5 being the year.

Thanks again,
David
 
Marshall,
Try your format statements where the day of the year is less than 100. You
will note some problems in the display of the data.

For instance
Format(#1/27/2005#,"yyyyy") -->> 200527

If you want a three-character day in this you need to do this in two parts
Format(Date(),"yyyy") & Format(DatePart("y",Date()),"000")
 
Well, I have to admit it was easy to spot. Mainly cause I've done that to
myself more than once - but not more than thrice.

Marshall said:
Clearly not what David wanted.

Thanks fot pointing that out John.
--
Marsh
MVP [MS Access]
Marshall,
Try your format statements where the day of the year is less than 100. You
will note some problems in the display of the data.

For instance
Format(#1/27/2005#,"yyyyy") -->> 200527

If you want a three-character day in this you need to do this in two parts
Format(Date(),"yyyy") & Format(DatePart("y",Date()),"000")
 
Back
Top