i want to send the logout time to database... but how to do it so that the date in database will look like that? 2007-11-23 12:19:19.373044+08 $logout_date = date('Y-m-d h:i:s'); echo "logout date: ".$logout_date; $rs1 = $conn->execute($sql,array(2,$logout_date ,$_SESSION['user_id'].session_id(),$_SERVER['REMOTE_ADDR'])); PHP:
I am guessing this is the milliseconds of the transaction? If so there isnt really a date type to handle this. You might need to create a custom field of VARCHAR in your database to store a date in this format, although that isnt advised. Have you considered creating 2 fields, one for the date and one for the milliseconds using microtime() That way you can concatenate them as you need it. Good Luck