aram Posted May 30, 2011 Share Posted May 30, 2011 Hi i want to add date and time to mysql datetime type and i have added this code but its adds (0000-00-00 00:00:00) $time= date('H:i:s'); $date= date("m.d.y"); $current= $date ." ". $time;$sql="UPDATE table SET current='$current'"; Link to comment Share on other sites More sharing options...
justsomeguy Posted May 30, 2011 Share Posted May 30, 2011 It expects Y-M-D format, and dashes instead of dots. Look at the format:0000-00-00 00:00:00 Link to comment Share on other sites More sharing options...
aram Posted May 31, 2011 Author Share Posted May 31, 2011 It expects Y-M-D format, and dashes instead of dots. Look at the format:0000-00-00 00:00:00 Thanks i fexed it Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.