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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting a date to number of days since January 1, 0000 A.D. 1

Status
Not open for further replies.

tbt102

Programmer
Jan 1, 2002
61
US
Hi all,

Has anyone implemented code that converts a date from month day, ccyy (may 20, 2003) to the number of days since January 1, 0000 A.D.?

Any help and/or sample code would be appreciated.

Thanks.

 
NotSoVisual,

We have an old VB application that creates rows in a DB, calculates the JND the row was created on, and appends that date to a column in the row.

We created a newer application, that's on a shelf, that does reporting on the DB that is JDN driven.

The person that created the original VB app is no longer here, we can't find the old code, and no one knows the algorithm she used to come up with JDN.

I used the code you posted to back into the start JDN used in the old app. Then implemented your code with old start JDN in the new app.

Now the new reporting app picks up all the correct records when the Gregorian date is entered.

This issue kept the new app out of production for a long time.

The conversion back to JDN will be use to make the report look pretty.

thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top