Print this page
Wednesday, 03 August 2016 10:14

How to convert CSV date format into MySQL date format in Excel

Written by
Rate this item
(1 Vote)
How to convert a 10 Digit Number (or Unix Timestamp) into a date in excell How to convert a 10 Digit Number (or Unix Timestamp) into a date in excell Microsoft

In this article, you will find a simple way to format CSV dates ready to import in mySQL database

Exported date fields from mySQL become strings in Excel CSV as follows 01/05/2016 00:00, The following simple tutorial explains how to convert the dates back into MySQL format

  • Open your CSV in Excel or Export your MySQL DB as CSV in excel.
  • Select the cell containing the date you wish to convert.
  • Select "custom" (or "more Number formats") from the format cells dropdown (See image below).

    Converting CSV date to MySQL dates screenshot 1

  • In the type field type Enter “yyyy-mm-dd hh:mm:ss” (see image below)

    Converting CSV date to MySQL dates screenshot 2

  • Select the cell, copy it and paste the format to all other cells containing dates.

    Converting CSV date to MySQL dates screenshot 3

  • Import your CSV into MySQL.

 

If you like this article please add a link to it from your site, blog, facebook page, twitter or any online page. Thank you.

 

 

 

 

Read 3502 times Last modified on Tuesday, 15 May 2018 10:49
Fabien Bello

Fabien Bello has been working in web and app develoment since 1997. He has held numerous positions from game developer to head of creative and product development for major firms such as Xerox, Gala Coral Group. Fabien continues contributing to online community, owns and manages several websites as well as offering consultancy to all size businesses.

Latest from Fabien Bello

Related items

3 comments