UBB.Dev
Posted By: alec the year 101? - 06/13/2001 11:08 AM
I've written a guestbook program wich also writes the time and the date in a textfile. But for some reason the program takes 101 as the year instead of 2001 or 01. How can I solve this?
Posted By: Dave_L Re: the year 101? - 06/13/2001 12:24 PM
How exactly are you obtaining the date and writing it to the file?

If you're doing it like this, then $year is the number of years since 1900, and $mon is in the range 0..11:
Code
code:

[ June 13, 2001 05:37 AM: Message edited by: Dave_L ]
Posted By: alec Re: the year 101? - 06/13/2001 1:17 PM
I use this:

Code
code:
So, does somebody have a suggestion?
Posted By: Dave_L Re: the year 101? - 06/13/2001 1:20 PM
$RealYear = 1900 + $Year;
Posted By: alec Re: the year 101? - 06/13/2001 1:32 PM
Now it works. Thanks!
© UBB.Developers