[thelist] parsing numbers trap

Jon Haworth jhaworth at witanjardine.co.uk
Fri Jun 15 11:35:16 CDT 2001


Also, you can store your dates as unix timestamps in an integer column.
Makes date calculations a *lot* easier in PHP, and if you want to display it
on the screen you just bung it through date("jS F Y", $timestamp) or
something similar.

Cheers
Jon


-----Original Message-----
From: Jay Greenspan [mailto:jay at trans-city.com]
Sent: 15 June 2001 17:15
To: thelist at lists.evolt.org
Subject: Re: [thelist] parsing numbers trap


I'll just mention that MySQL's date_format() offers another way of dealing
with dates like this:

mysql> select date_format('2001-08-04', '%W %M  %D, %Y');
+--------------------------------------------+
| date_format('2001-08-04', '%W %M  %D, %Y') |
+--------------------------------------------+
| Saturday August  4th, 2001                 |
+--------------------------------------------+
1 row in set (0.00 sec)


There are specifiers for about any format you'd need. Check the manual.

-j


**********************************************************************
'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'

**********************************************************************




More information about the thelist mailing list