Text function in Power Apps

The Text function converts any value to a string of text. It can also be used to format date/time value to a string of text.

Power Apps syntax Text(AnyDate, format)

Example: Suppose today the date is Wednesday, 11th Dec 2024. We can see the following power apps formula with the different date-time formats.

a) d The format “d” displays the day as a number without a leading zero from the given data/time value.

Power Apps Formula

Text(Today(),"d")

The output of the above code is shown below:

Text function in Power Apps

b) dd The format “dd”, displays the day as a number with a leading zero when appropriate from the given data/time value.

c) ddd The format “ddd”, displays the weekday as an abbreviation (Sun to Sat) from the given data/time value.

Power Apps Formula

Text(Today(),"ddd")

The output of the above code is shown below:

Text function in Power Apps

d) dddd The format “dddd”, displays the day as a full name (Sunday to Saturday) from the given data/time value.

Power Apps Formula

Text(Today(),"dddd")

The output of the above code is shown below:

Text function in Power Apps

e) m The format “m” displays the month from the date/time value as a number without a leading zero from the given data/time value.

Power Apps Formula

Text(Today(),"m")

The output of the above code is shown below:

Text function in Power Apps

f) mm The format “mm” displays the month as a number with a leading zero when appropriate from the given data/time value.

Power Apps Formula

Text(Today(),"mm")

g) mmm The format “mmm” displays the month as an abbreviation (Jan to Dec) from the given data/time value.

Power Apps Formula

Text(Today(),"mmm")

The output of the above code is shown below:

Text function in Power Apps

h) mmmm The format “mmmm” displays the month as a full name (January to December) from the given data/time value.

Power Apps Formula

Text(Today(),"mmmm")

The output of the above code is shown below:

Text function in Power Apps

i) yy The format “yy” displays the year as a two-digit number from the given data/time value. It returns the last two digits from an year value.

Power Apps Formula

Text(Today(),"yy")

The output of the above code is shown below:

Text function in Power Apps

j) yyyy The format “yyyy” displays the year as a four-digit number from the given data/time value.

Power Apps Formula

Text(Today(),"yyyy")

The output of the above code is shown below:

Text function in Power Apps