woles010813
woles010813

Reputation: 1

how to change the date format in excel to text so it can convert in mysql

I have data in excel in which there is a column date formatted dd/mm/yyyy. that excel data I want to convertted to mysql. the problem is after converting this, mysql read as 0000-00-00.

I used formula =TEXT(A1,"YYYY-MM-DD") but the excel ask for punctuation mark (') in front of sign equal to (=) I change the date to 'YYYY-MM-DD and mysql success to read the date.

What exactly the best formula I used to apply to all (if more than 200) date so it can read by mysql.

thanks

Upvotes: 0

Views: 523

Answers (1)

El Tigre
El Tigre

Reputation: 182

This should do the trick:

  1. Highlight the column
  2. Right click and select Format Cells
  3. Select Custom
  4. In the Type field enter yyyy-mm-dd

Now your dates should be in the correct format.

Upvotes: 1

Related Questions