How to display AM/PM for a Date field in Canvas Apps

Hello All !!!!. 

Welcome to our Anything & Everything in tech blog 😊😊. 

The topic for today is on Microsoft Power Apps and in this post I will show show AM/PM for your date fields.

Canvas apps are the leading low code framework for mobile apps and custom user interfaces. One of the powerful feature being able to bring in data from multiple data sources using just connectors. They are just termed as One Click Data from Multiple Platforms

Let me jump in to the topic. I have a requirement to display display a date with AM/PM. 

Unfortunately, Canvas apps function reference does not have any function to do this. However you can use the ubiquitous Text function to do it.

$"{Text(Today(), "dd/mm/yyyy, hh:mm am/pm")}"

Within the Text() you can pass your date field and specify the desired format. Observe the part highlighted in bold - am/pm. I have seen implementations where makers end up using switch case on the hour field to determine AM/PM time.

In the below illustration, I have used am/pm in date format to display the Meridian values 


Hope this post helps you in your day-to-day activities. 

Subscribe to my blog Anything & Everything for more interesting topics in code and tech😊

Comments

Popular posts from this blog

How to use Google fonts in your Web Page

How to include {Custom Pages of Model Driven App} within the solution