web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / TimeDate Field AM PM H...
Power Apps
Answered

TimeDate Field AM PM Hour Changing to First Item on Reopening

(0) ShareShare
ReportReport
Posted on by 94
Good morning.
 
I have a SharePoint Integrated form with a datetime field where I followed these instructions with a full understanding of how it works:
 
 
When a form is new and the date and time is selected, it submits correctly to the SharePoint list. However, when reopening the item, the hour defaults to the first value in the Hour Items property.  We would like for the default to be "99", if time is not known.
 
My values in the item column are 
 
["99","01","02","03","04","05","06","07","08","09","10","11","12"]
 
Even when keeping everything as in the Practical Powerapps link above (and other instruction I have found on this subject), the hourdatacardvalue still changes to the first item when opening in view then edit.  I am trying to figure out how in the Default property of the hourdatacardvalue, there could be an else ThisItem.Hour(TimeDateColumnName).
 
Any assistance is so much appreciated.
 
 
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    4,004 Super User 2026 Season 2 on at
     
    Please check if the time value exists in the item - if the time is not set or blank, default to "99". If the time exists, extract the hour part and set it as default.
     
    If(
        IsBlank(ThisItem.TimeDateColName),
        "99",
        Text(Hour(ThisItem.TimeDateColName), "[$-en-US]00")
    )
    
     
    Please note that TimeDateColName is the SP column you are working with.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Suggested answer
    11manish Profile Picture
    3,849 Super User 2026 Season 2 on at
    you can also try below :
    If(
        IsBlank(Parent.Default),
        "99",
        Text(Hour(Parent.Default), "00")
    )
     
  • Verified answer
    IntraAdmin Profile Picture
    94 on at
    Thank you, @Haque.
     
    You definitely put me on the right track.  The following is what worked and was thoroughly tested.  I am so grateful for your quick feedback.
     
    If(
        IsBlank(ThisItem.IncidentDate),
        "99",
        With(
            {
                _Hour: Mod(
                    Hour(Parent.Default),
                    12
                )
            },
            Text(
                If(
                    _Hour = 0,
                    12,
                    _Hour
                ),
                "[$-en-US]00"
            )
        )
    )
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 410 Most Valuable Professional

#2
11manish Profile Picture

11manish 159 Super User 2026 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 89 Super User 2026 Season 2

Last 30 days Overall leaderboard