RE: [PHP] dates from db
| From: | Jon Haworth | Date: | Wed, 07 Mar 2001 13:37:32 +0000 |
| Subject: | RE: [PHP] dates from db | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42898@lists.php.net to get a copy of this message | ||
If it's stored as a unix timestamp you can format it any way you like.
[www.php.net/date]
If it's stored as a string in the YYYY-MM-DD hh:mm:ss format, you can use
substr(0,10) [www.php.net/substr] to get the first 10 characters and only
display those.
HTH
Jon
-----Original Message-----
From: Matt Davis [mailto:matt@roundyourway.co.uk]
Sent: 07 March 2001 13:35
To: Php Mailing List
Subject: [PHP] dates from db
I am calling on a number of fields from my db one of which is a date. When
the date displays it is in the following format
YYYY-MM-DD 00:00:00
I Want it to only display the date and not the time like this
YYYY-MM-DD
Is it possible to remove the time when calling on it from the db
can anyone help?
Thanks
Matt.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
**********************************************************************
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or
confidentiality'
**********************************************************************