Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:27:24+00:00 2026-06-04T01:27:24+00:00

*(This is for ISV database so I am kind of reverse engineering this and

  • 0

*(This is for ISV database so I am kind of reverse engineering this and cannot change) …

How can I do the following date to int (visa/versa) conversion in C# …

So Say the Date is:

5/17/2012

it gets converted to int

77207

in the database.

At first I thought this was a Julian date however it does not appear to be the case. I was fooling around with the method from Julian Date Question however this does not match up.

   var date = ConvertToJulian(Convert.ToDateTime("5/17/2012"));
   Console.WriteLine(date);

    public static long ConvertToJulian(DateTime Date)
    {
        int Month = Date.Month;
        int Day = Date.Day;
        int Year = Date.Year;

        if (Month < 3)
        {
            Month = Month + 12;
            Year = Year - 1;
        }
        long JulianDay = Day + (153 * Month - 457) 
        / 5 + 365 * Year + (Year / 4) - 
        (Year / 100) + (Year / 400) + 1721119;
        return JulianDay;
    }

Outputs 2456055 //Should be 77207

I’ve been using this SQL to do the conversion:

SELECT Convert(date, CONVERT(CHAR,DATEADD(D, 77207, '1800-12-28'),101))

and it appears to be accurate. How could I do this conversion in C# ? And can someone edify me as to what standard this is based on or is it simply a random conversion. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:27:25+00:00Added an answer on June 4, 2026 at 1:27 am

    This appears to be a Clarion Date:

    the number of days that have elapsed since December 28, 1800

    Allegedly to, Display Clarion Dates In Excel it only takes

    subtracting 36161 from the value and formatting it as a date

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first attempt at reverse engineering, and really, I don't know how
This somehow simple task is not so simple. I can get the number of
How can I run an ASP.net 4.0 app in the ISV folder on CRM
I am working on a Reverse Engineering school project, which requires to translate manipulate
This code is correct but the folder size is wrong. If I change the
Can someone help me figure out how can I modify this so that searching
im struggling with syntax here: hopefully this question is v simple, im just miising
This is really just for my own use: I would like to be able
This has been a rather problematic issue on numerous occasions. We have alot of
This should be simple, but the answer is eluding me. If I've got a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.