I feel into the same trap when I was working with dates.

The date you get is correct (95) because 95+1904 = 1999 which is the date you started 
with.

Chris


On Thu, 8 Apr 1999 07:49:28 -0500 [EMAIL PROTECTED] wrote:
> 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]




This message sent using EMUmail.  http://EmuMail.com

Reply via email to