John Kelsey wrote:

> The correct snippet (which still is missing four years...)
> 
> char Date[11];
> {
>    DateType sDate;
>    DateSecondsToDate(TimGetSeconds(), &sDate);
>    DateToAscii(sDate.month, sDate.day, sDate.year, dfMDYWithSlashes, Date);
> }

RTFM

DateToAscii takes four digit years, and NOT the years since 1904 that 
is contained in the DateType structure.
So you are actually converting 8 April 0095 to text in your above 
example. (Say, is that the Y0K bug? :-)

Simply add 1904 to the year parameter, and live happily.

Murray Dowling
Deskfree Computing
http://www.deskfree.com/

Reply via email to