Excel Date to String conversion

Chaitanya MSV picture Chaitanya MSV · Apr 14, 2010 · Viewed 394.4k times · Source

In a cell in Excel sheet I have a Date value like:

01/01/2010 14:30:00

I want to convert that Date to Text and also want the Text to look exactly like Date. So a Date value of 01/01/2010 14:30:00 should look like 01/01/2010 14:30:00 but internally it should be Text.

How can I do that in Excel?

Answer

Kirill picture Kirill · Apr 14, 2010
=TEXT(A1,"DD/MM/YYYY hh:mm:ss")

(24 hour time)

=TEXT(A1,"DD/MM/YYYY hh:mm:ss AM/PM")

(standard time)