Solved

Julian day

Posted on 2001-08-31
4
427 Views
Last Modified: 2008-03-17
Hi, I need to convert a  date to a julian day..  any ideas....
0
Comment
Question by:Delboy
4 Comments
 
LVL 15

Accepted Solution

by:
lyonst earned 30 total points
ID: 6444524
0
 
LVL 27

Expert Comment

by:planocz
ID: 6444540
Hi Delboy,
 One way to do J dates is with date format,
  Dim SDate as string
      SDate= format(sdate, "yyy")
  This will give you the Julian date with the year on the front of it.
0
 

Author Comment

by:Delboy
ID: 6444592
FAB  thanks for your help
0
 
LVL 22

Expert Comment

by:ture
ID: 6445058
Delboy,

This little function will give you the julian date, always with 5 digits, in the format YYDDD.

Function Julian(d As Date) As String
  Julian = Format(d,"YY") & Format(D-DateSerial(Year(d)-1,12,31),"000")
End Function

Ture Magnusson
Karlstad, Sweden
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now