RE: [PHP] dates from db

2001-03-07 Thread Jon Haworth
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 -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:

RE: [PHP] dates from db

2001-03-07 Thread Mark Roedel
-Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 7:35 AM 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

RE: [PHP] dates from db

2001-03-07 Thread Eric Naujock
My own solution to this is a bit more complex but it seems to work with both of the databases I work with. MySQL and Postgress. for example I would use 'select *,unix_timestamp(cr_date) as my_cr_date from table where ref_index=2345;' Then when I go to output it I can use the unix date command