By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,712 Members | 1,540 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,712 IT Pros & Developers. It's quick & easy.

Gregorian to Julian Date conversion

P: n/a
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

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <Ch*********@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
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


Nov 19 '05 #2

P: n/a
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

Nov 19 '05 #3

P: n/a
"Chris Davoli" <Ch*********@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
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;
}
Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.