PDA

View Full Version : 'cropping' database information


Adam_C
07-18-2010, 09:21 PM
Hi, im relatively new to PHP and i have a database with table information such as date etc. how to i 'cut up' the information in that date array though?

for example in the table the date is '2010-07-18 14:23:06' how do i cut it up to seperate vars such as $day, $month, $year and $time ?

thanks very much in advance!

adam c,

edbr
07-19-2010, 02:20 AM
you have to format the date is it a timestamp or datetime field?

edbr
07-19-2010, 06:05 AM
in any case this might help youhttp://www.w3schools.com/PHP/php_date.asp

Adam_C
07-19-2010, 03:23 PM
in any case this might help youhttp://www.w3schools.com/PHP/php_date.asp

thanks very much! :)