How to Change Date Format in Power Apps Data Table?

When working with dates in Power Apps data tables, sometimes you must change the date format to suit your application’s requirements or user preferences.

Recently, I was working on the Power Apps data table control where I needed to change a SharePoint date format to dd/mm/yyyy.

In this Power Apps tutorial, I will show you how to change date format in Power Apps data table using two various scenarios:

  • Change date format in Power Apps Data table using SharePoint Date column
  • Change date format in Power Apps Data table using SharePoint Calculated Date column

How to Change Date Format in Power Apps Data Table

Here, we will see how to change the Power Apps Data table date format using a SharePoint list date column and a SharePoint Calculated date column. Let’s explore one by one.

Change Date Format in Power Apps Data Table using SharePoint Date Field

I have a SharePoint Online list named “Product Details,” which contains different fields, including the Date and time field [Purchase Date].

Note: Whenever a user add "Date and time" column in the SharePoint list, by default the Date format will be "mm/dd/yyyy".

Input:

How to Change Date Format in Power Apps Data Table

But, I want to change this SharePoint default date format to “dd/mm/yyyy” in my Power Apps data table control as in the screenshot below.

Output:

How to Change Date Format in PowerApps Data Table

You can follow the below steps to achieve it. Such as:

1. On the Power Apps screen -> Insert a Data table and set its Items property as:

Items = 'Product Details'

Where,

  • ‘Product Details’ = SharePoint Online List
How to Change a Date Format in PowerApps Data Table

2. Now, select the Date and time field [Purchase Date] and change its Text property using the code below:

Text = Text(ThisItem.'Purchase Date',"dd/mm/yyyy")

Where,

  • ‘Purchase Date’ = SharePoint list date and time field
  • dd/mm/yyyy” = Specify the date format that you want to display in Power Apps Data table
How to Change a Date Format in Power Apps Data Table

3. This way, you can change the date format in the Power Apps data table. Have a look at the below output.

Change Date Format in Power Apps Data Table

4. Next, if you want to change the date format to “yyyy/mm/dd,” follow the below code on the Data table Text property:

Text = Text(ThisItem.'Purchase Date',"yyyy/mm/dd")
Change Date Format in PowerApps Data Table

5. You can also change the date format to “Month day, year” using the code below.

Text = Text(ThisItem.'Purchase Date',"mmm dd,yyyy")
Change the Date Format in Power Apps Data Table

6. Finally, if you want to change the date format and time, follow the code below.

Text = Text(ThisItem.'Purchase Date',"yyyy-mm-ddT:mm:ssZ")
Change the Date Format in PowerApps Data Table

This way, you can change the Power Apps date format using the SharePoint list.

Change date format in Power Apps Data table using SharePoint Calculated Date column

Now, with a simple example, I will show you how to change the SharePoint list calculated date column format in the Power Apps data table.

Example:

I have a SharePoint Online list named “Travel Requests,” and this list has one date and time column [Travel Start Date] and one calculated column named “Travel End Date” [It is created based on the date column].

Input:

Change Date Format in Power Apps Data Table using SharePoint List
Note: Whenever the user adds the SharePoint list calculated date column in the Power Apps data table, it will display the date farmat as always including with the time.

Follow the screenshot below of how the Powe Apps data table gives the SharePoint calculated column data format.

Change Date Format in PowerApps Data Table using SharePoint List

I want to change this date and time format to only the “mm/dd/yyyy” format. Select the calculated column [Travel End Date] and set its Text property to the code below.

Text = Text(DateValue(ThisItem.'Travel End Date'), "mm/dd/yyyy")

Where,

  • Travel End Date = SharePoint list calculated column
Change Date Format in PowerApps Data Table using SharePoint Calculated Column

Once your app is ready, Save, Publish, and Preview the app. The data table formats the calculated date column to “mm/dd/yyyy” as shown below.

Change Date Format in Power Apps Data Table using SharePoint Calculated Column

I trust this Power Apps tutorial helps. Following the above steps, you can change the date format in a Power Apps data table based on different date formats, like dd/mm/yyyy, yyyy-mm-ddT:mm:ssZ, etc.

Also, you may like some more Power Apps articles:

>