Hi everyone. I am trying to make a table that when people edit something from it, it will show the date it was edited.
This is my code:
[PHP]$date = date("m/d/Y");
mssql_query("IN SERT INTO news2 (title, dtime, text1, text2) VALUES ('$title', $date, '$text1', '$text2')");[/PHP]
The thing is that when I check the table, the time is messed up. It shows 4/11/1900 instead of 01/20/2008.
And if its possible, is there a way I could change the format of the date at the MSSQL? I need something like this:12:55 01/20/2008.
Btw, the data type of the column is datatime.
Thank you
~ SalokinX
This is my code:
[PHP]$date = date("m/d/Y");
mssql_query("IN SERT INTO news2 (title, dtime, text1, text2) VALUES ('$title', $date, '$text1', '$text2')");[/PHP]
The thing is that when I check the table, the time is messed up. It shows 4/11/1900 instead of 01/20/2008.
And if its possible, is there a way I could change the format of the date at the MSSQL? I need something like this:12:55 01/20/2008.
Btw, the data type of the column is datatime.
Thank you
~ SalokinX
Comment