Jump to content

[SOLVED] Datetime doesn't want to insert....


freeloader

Recommended Posts

I have a table called DB_Messages. It has columns MessageID, Sender, Content, SentTime. That last field is a datetime field.

 

When I run following query:

INSERT IGNORE INTO DB_Messages (MessageID, Sender, Content, SentTime) VALUES('12345', 'Test', 'Test msg', '2009-27-06 12:59:00')

 

Everything gets inserted in the db neatly, but the time stamp is suddenly '0000-00-00 00:00:00'.

 

I really can't seem to see the bug here. Any help appreciated.

Link to comment
https://forums.phpfreaks.com/topic/163938-solved-datetime-doesnt-want-to-insert/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.