sql - How to save a date in MySQL database with specific format? -


I have insertion query with the following information, which I have the problem of putting MySQL database with a date value to me is:

  INSERT obstacles (Mac_aidi, Market_aidi, Bukmekr_aidi, 3 Ve_reslt_l, 3 Ve_arilt_aks, 3 Ve_phle_2, Mac_det) value (1682572, 1, 21, 3.15, 1.00, 1.00, DATE_FORMAT (STR_TO_DATE ('18 .02.2014 ','% D.% M %% y ','% d. %%% Y% Y '))  

the right to work alone (saved properly date But YYYY-MM-DD) but when I'm connects DATE_FORMAT it is saved as an invalid value of "2018-02-20"

I want to save this format '18 .02.2014 'I

can you correct my query?

MySql date data type only YYYY for you to store -mm-allows you to use the dd format. but when selecting data, you can use the format that you want to format your results.


Comments