John,

I use TimSecondsToDateTime without a hitch.  If all else fails, you could
switch to that function.


-----Original Message-----
From: John Kelsey <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, April 08, 1999 8:48 AM
Subject: 4 Years Lost between TimGetSeconds and DateSecondsToDate


>Fellow Developers,
>
>Can any one confirm or deny a bug or documentation shortcoming... or
explain
>what I'm doing wrong?
>
>I think the code snippet below should load Date[] with the current date yet
>it is always 4 years off (99->95).  I'm guessing it's because
>TimGetSeconds() returns seconds since 1904 but DateSecondsToDate() wants
>seconds since 1900 (despite what the documentation says).
>
>Is the documentation Wrong?
>Is there a bug?
>Is there a defect in my code?
>Is there a better (and correct) way of doing this?
>
>
>
>char Date[11];
>{
>   DateType sDate;
>   DateSecondsToDate(TimGetSeconds(), &sDate);
>   DateToAscii(Month, Day, Year, dfMDYWithSlashes, Date);
>}
>
>
>
>John Kelsey
>
>Director, Project Management
>Tacit Solutions, Inc.
>Voice (812) 423-7800
>Fax (812) 423-7801
>Email [EMAIL PROTECTED]
>
>
>
>
>


Reply via email to