The TEXT function formats numbers as text based on a specified format. For instance, =TEXT(A1, "dd/mm/yyyy") formats a date in A1 as day/month/year.