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;
}

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post jason@cyberpine.com ASP .Net 2 08-13-2006 02:24 PM =?Utf-8?B?SmFjaw==?= Microsoft Certification 1 07-25-2006 10:14 AM Sam ASP .Net 1 04-27-2005 01:12 PM =?Utf-8?B?UmFqYQ==?= ASP .Net 1 11-12-2004 06:08 PM h_ghanaty ASP .Net 1 11-09-2003 06:02 AM