Excel: Convert DateTime Column to Text

visibility 60 access_time 10 months ago languageEnglish

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")

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.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 0.22
More from Kontext
C# - Get Current and Last Month Start and End Date
visibility 73
thumb_up 0
access_time 5 months ago
Trim Leading or/and Trailing Zeros in Teradata
visibility 7,566
thumb_up 2
access_time 2 years ago