mysql insert datetime
snippet in sql

mysql insert datetime

user1051

-- If you just need to insert the current DateTime: --
INSERT INTO yourtable (`DateTimeFieldName`) VALUES (NOW());

mysql insert date

user8775

INSERT INTO custorder 
  VALUES ('Kevin', 'yes' , STR_TO_DATE('1-01-2012', '%d-%m-%Y') ) ;
                        ^                                     ^
---parenthesis removed--|                and added here ------|