Click to See Complete Forum and Search --> : storing date


barantamer
03-13-2008, 03:14 PM
hello , i want to store the date and time of a process to my databas.



$date=date("Y-m-d h:i:s ")

i tried to save like this it didnt work ..is that possible to store time to a type date column or should i store the timestamp and convert when i need to use the time and the date?

thanks

barantamer
03-13-2008, 03:37 PM
i found the answer to my question so fast ,
if anyone wants to know
i have chaged my date fields type from DATE to DATETIME

sanchez_1960
03-14-2008, 07:28 AM
FYI, you can do this on the database level by just doing CURDATE() or CURTIME() on your inputs.