The TEXT function in Excel converts a date or time to text in a specified format. The syntax is:

=TEXT(value, format_text)

Examples:

  • Format today's date: =TEXT(TODAY(), "MM/DD/YY") results in 03/14/12

  • Format a time: =TEXT(A1,"hh:mm:ss AM/PM") where A1 is a time formatted cell and produces results like 04:04:00 PM

Tip: For more information and examples, see TEXT function.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.