I am familiar with the DATE_FORMAT function, which can display an entry from my date field in the specified format. However, I would like to create a table with a date field that accepts only my format.
Here is what I have done so far:
CREATE TABLE test_table ( id INT AUTO_INCREMENT, f_name VARCHAR(40) NOT NULL, l_name VARCHAR(25) NOT NULL, date_hired DATE NOT NULL );
Inserting a record with date_value '2013-03-01' will be inserted as '1/03/2013 12:00:00 AM', which is far from my expected result (I would like the format to be the way it was inserted). Any feedback? Did I miss something?
Thanks,
Michael
date mysql format date-format
Michael ardan
source share