cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Displaying calculated dates in short form without time in a form

I have a detail screen in my app which is used to show asset details for my company assets, two critical dates for us are the Next Service Date and the Warranty Expiry Date both of these values are calculated in my SharePoint list and when I add the fields to the Detail Form they are displaying in the following format 2012-06-31T23:00:00Z, whereas what we really need is this format 31-06-2021.

How can I define this formatting? 

3 REPLIES 3
Highlighted
Resolver I
Resolver I

Re: Displaying calculated dates in short form without time in a form

Hi, 

 

Use the Text(Now(),ShortDate)

Instead of Now() you can use your database column name of date. 

 

 

 

 

Highlighted
Resolver V
Resolver V

Re: Displaying calculated dates in short form without time in a form

Hi,

 

Here is the date format detail in powrapps

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/show-text-dates-times

 

Text ( Formula),"DD-MM-YY")

Highlighted
Super User
Super User

Re: Displaying calculated dates in short form without time in a form

You can use:

Left(TextBox1.Text,Find("T",TextBox1.Text)-1)
Assuming the your data is in TextBox1, put the formula in another textbox2
 
If the data is in a Table, create a Collection:
ClearCollect(CollNewTable, AddColumns(YourTable,"NewDate",Left(Date,Find("T",Date)-1)))
 
Then use the collection which has the converted table: CollNewTable
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,665)