Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date format

Status
Not open for further replies.

EPBoone

Technical User
Feb 3, 2001
19
0
0
US
We use a Julian Date for just about everything where I work. How can I format the date for this? For example, a Julian date for March 16th, 2001 would look like: 01075.

01 being the year.
075 being the day of the year.
 
=Right(Year([yourdate]),2) & Format(Day([yourdate]),"000")


Dave
 
MyJulianDate = "01075"
MyYr = Str(Left(MyJulianDate, 2))
MyDay = Right(MyJulianDate, 3)
MyDate = DateAdd("d", MyDay - 1, "01/01/" & (MyYr))
? MyDate
3/16/01


Although it is somewhat curious. You Julian Dates are Zero Based? That's why the " - 1" is in the date artithmatic.

MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top