Excel: Convert DateTime Column to Text

visibility 88 event 2021-08-18 access_time 2 years ago language English
more_vert

TEXT function can be used in Excel to convert DATETIME column to a text column with provided format.

Code snippet

=TEXT(A1,"YYYY-MM-DD HH:mm:ss")

20210818100343-image.png

To YYYY-MM-DD

=TEXT(A1,"YYYY-MM-DD")

To AM/PM

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

More format

TEXT function - Office Support (microsoft.com)


copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

recommendMore from Kontext