Velocity Reviews > Gregorian to Julian Date conversion

# Gregorian to Julian Date conversion

=?Utf-8?B?Q2hyaXMgRGF2b2xp?=
Guest
Posts: n/a

 02-02-2005
Is there a class that converts from Gregorian date to TRUE Julian Date in
..NET? Any VB.NET examples available?

ie;
The Julian date is calculated by the number of days since January 1, 4713
BC. For example, the Julian date for August 1, 2001 is 2452122.
--
Chris Davoli

Ken Cox [Microsoft MVP]
Guest
Posts: n/a

 02-02-2005
Hi Chris,

There's some code on this page that seems to convert a Gregorian date to a
Julian date. Perhaps that will get you started?

http://msdn.microsoft.com/library/en...asp?frame=true

"Chris Davoli" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there a class that converts from Gregorian date to TRUE Julian Date in
> .NET? Any VB.NET examples available?
>
> ie;
> The Julian date is calculated by the number of days since January 1, 4713
> BC. For example, the Julian date for August 1, 2001 is 2452122.
> --
> Chris Davoli
>

=?Utf-8?B?Q2hyaXMgRGF2b2xp?=
Guest
Posts: n/a

 02-03-2005
I've already been to that page in the msdn, but it does not have a method for
getting the "TRUE" julian date. Seems like there would be a method that does
this rather than reinventing the wheel. How can I convert Gregorian to TRUE
julian date?

ie;
The TRUE Julian date is calculated by the number of days since January 1,
4713
BC. For example, the Julian date for August 1, 2001 is 2452122.

"Chris Davoli" wrote:

> Is there a class that converts from Gregorian date to TRUE Julian Date in
> .NET? Any VB.NET examples available?
>
> ie;
> The Julian date is calculated by the number of days since January 1, 4713
> BC. For example, the Julian date for August 1, 2001 is 2452122.
> --
> Chris Davoli
>

Mark Rae
Guest
Posts: n/a

 02-03-2005
"Chris Davoli" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...

>> Is there a class that converts from Gregorian date to TRUE Julian Date in
>> .NET? Any VB.NET examples available?

public double GetJulianDate(DateTime pdtmDate)
{
DateTime dtmStart = new DateTime(1,1,1);
TimeSpan objTS = new TimeSpan(pdtmDate.Ticks - dtmStart.Ticks);
return objTS.TotalDays + 1721637;
}