using excel dates for importing into phpmyadmin sql

前端 未结 2 672
名媛妹妹
名媛妹妹 2020-12-20 00:35

I have a table in excel (CSV) which I am importing into phpmyadmin.

the cells show the date fine such as: 09/11/2012 0:00 The cell format is \"custom\"

when

2条回答
  •  情书的邮戳
    2020-12-20 01:28

    I had this problem and thought I formatted them to format YYYY-MM-DD. They were displayed that way, but in the Formula bar it was still in DD/MM/YYYY format. So I actively changed the date with:

    =YEAR(A1)&"-"&IF(MONTH(A1)<10;"0";"")&MONTH(A1)&"-"&IF(DAY(A1)<10;"0";"")&DAY(A1)
    

    And then copied the values of these cells to replace the original ones...

提交回复
热议问题