RE: [PHP-WIN] Y2K date
| From: | Darvin Andrioli | Date: | Tue, 17 Oct 2000 09:28:07 +0000 |
| Subject: | RE: [PHP-WIN] Y2K date | ||
| Groups: | php.db php.windows | ||
| Request: | Send a blank email to php-db+get-3674@lists.php.net to get a copy of this message | ||
Hi Stephane,
It seems that $DateN doesn't contain a valid timestamp.
What do you get from your database?.Do you get "01/01/2000" or the timestamp for that
date?
In the first case you must use mktime as parametr for date. Look this example taken from php manual.
date( "d/m/Y", mktime(0,0,0,01,01,200) );
Bye
Darvin
-----Original Message-----
From: CESBRON S. [SMTP:scesbron@escna.fr]
Sent: Tuesday, October 17, 2000 10:13 AM
To: php-windows@lists.php.net
Cc: php-DB@lists.php.net
Subject: [PHP-WIN] Y2K date
Hi everybody,
I'm getting trouble with date usage. I've got a database with a date field
in it. This date is for example set up to 01/01/2000. I wanted to display
it, and before doing such a task, I had to reformat it with the usage of
the date function.
Here is my code :
$DateN = date("d/m/Y",$DateN);
echo "$DateN";
Here's what I get :
01/01/1970
Is anyone aware of this ?
What can I do ?
Any suggestions will be greatly appreciated.
Thanks
Stéphane
Stéphane Cesbron
Chargé du développement Internet/Intranet
AUDENCIA
Nantes.Ecole de Management
8 route de la Jonelière
B.P. 31222
44312 Nantes Cedex 3
Tél : 02.40.37.34.47
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net