Monday, January 11, 2016

How to convert dates format into text format in excel

Uploading data into the database cannot use date/time format so it need to be in text format. Therefore we need to convert all the dates in text format. Use the following command to change it

=TEXT(A1,"yyyy-mm-dd")

Where A1 = Cell
yyyy-mm-dd = the date format in text form

You can use different variation like "dd/mm/yyyy", or "yyyy-mm-dd" and try whichever suit your preference.

NOTE: When you saved the value and open again in the future it will convert back to date format as long as the text resembles date/time format arrangement. You can ad space or apostrophes to make the value stays not converting back itself

To keep the data permanently in text format copy them to notepad and keep it

No comments:

Post a Comment