• Date Calculation (today – 36161) (Access 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Date Calculation (today – 36161) (Access 2003)

    Author
    Topic
    #414260

    Ran into a peculiar date situation… date is depicted in a Clarian dump as 74, 334 (aprox.) as a long integer… fine. But when you import to a table as a Long, then try to format to a “readable” date-string it has doen’t recognize the number (tested with that 74334). I was told you subtract 36161 from Jan 1, 1900 and voila! there’s your string. Smells fishy to me. In VBA I don’t get a date, moreover, shouldn’t the math dictate you subtract the adjustment from today’s date? Regards Wayne

    Viewing 1 reply thread
    Author
    Replies
    • #919438

      Windows stores dates as the number of days since December 30, 1899. Apparently, Clarion uses a date in 1800 as starting point, so there is a fixed difference between dates as stored in Clarion and as stored in Windows applications. To convert any Clarion date to a Windows date, subtract the fixed difference, and to convert any Windows date to a Clarion date, add the fixed difference.

    • #919439

      Windows stores dates as the number of days since December 30, 1899. Apparently, Clarion uses a date in 1800 as starting point, so there is a fixed difference between dates as stored in Clarion and as stored in Windows applications. To convert any Clarion date to a Windows date, subtract the fixed difference, and to convert any Windows date to a Clarion date, add the fixed difference.

    Viewing 1 reply thread
    Reply To: Date Calculation (today – 36161) (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: