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

View Time in 12 Hour Format in Form

Hi all,

 

I'm working on a little PowerApp where people can input and edit events to add to a capacity calendar. I used this walkthrough to get the time format on the entry form from a 24-hour to 12-hour format, and it is saving correctly in the List that this app feeds into. However when I tried to make a Form for people to look at/edit their past entries to the calendar the time is not showing correctly, even though it does display right in the gallery. I'm sure I'm missing something obvious but I've spent a ton of time looking for a solution and I'm just not seeing it! Any advice is hugely appreciated.

susannartaylor_0-1652986223165.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
susannartaylor
Regular Visitor

After continued Googling I finally stumbled upon the solution in this post. I'll type a quick summary below:

 

For the Hour field, change the Default to: 

Text(If(Mod(Hour(Parent.Default), 12) = 0, 12, Mod(Hour(Parent.Default), 12)),"[$-en-US]00")

 

Then for the AM/PM field, change the Default to:
If(Hour(Parent.Default) < 12, "AM", "PM")

 

Major shout out to @v-siky-msft  for providing the original solution!

View solution in original post

1 REPLY 1
susannartaylor
Regular Visitor

After continued Googling I finally stumbled upon the solution in this post. I'll type a quick summary below:

 

For the Hour field, change the Default to: 

Text(If(Mod(Hour(Parent.Default), 12) = 0, 12, Mod(Hour(Parent.Default), 12)),"[$-en-US]00")

 

Then for the AM/PM field, change the Default to:
If(Hour(Parent.Default) < 12, "AM", "PM")

 

Major shout out to @v-siky-msft  for providing the original solution!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,361)