Use MySQL’s STR_TO_DATE()
function to parse the string that you’re attempting to insert:
INSERT INTO tblInquiry (fldInquiryReceivedDateTime) VALUES
(STR_TO_DATE('5/15/2012 8:06:26 AM', '%c/%e/%Y %r'))
More Related Contents:
- MySQL: Insert datetime into other datetime field
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- How to set initial value and auto increment in MySQL?
- How to do a batch insert in MySQL
- Error in MySQL when setting default value for DATE or DATETIME
- LAST_INSERT_ID() MySQL
- MySQL Query to select data from last week?
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- Timestamp with a millisecond precision: How to save them in MySQL
- How to select date from datetime column?
- How to convert number of week into date?
- Set NOW() as Default Value for datetime datatype?
- SQL Query to show nearest date?
- How to subtract hours from a datetime in MySQL?
- Object of class DateTime could not be converted to string
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- MySQL Error 1264: out of range value for column
- BULK INSERT in MYSQL
- Importing a CSV to MySQL with different date format
- How to insert data to MySQL with auto-incremented column(field)?
- How to insert values in table with foreign key using MySQL?
- MySql difference between two timestamps in days?
- MySQL error 1241: Operand should contain 1 column(s)
- How to get current date & time in MySQL?
- MySQL Insert & Joins
- How to add a where clause in a MySQL Insert statement?
- how to cast the hexadecimal to varchar(datetime)?
- MySQL optimizing INSERT speed being slowed down because of indices
- “Unknown column in ‘field list'”, but column does exist
- Insert and set value with max()+1 problems