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.
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.
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.