cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
susannartaylor
Frequent 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
Frequent 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
Frequent 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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,816)