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 / Form Time Fields Error...
Power Apps
Answered

Form Time Fields Error in DataCard Update

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have customized SharePoint Form1.

I created fields that allow the user to enter time on a twelve-hour (AM/PM) clock basis.

I am catching an error on the semi-colon in the time formula (see below).

How do I correct this issue? Can I simply leave the semi-colon out?

Phineas_2-1717437098578.png

 


DataCard Update Property -
DateValue1.SelectedDate + TimeValue(HourValue1.Selected.Value & ":" & MinuteValue1_1.Selected.Value)

Phineas_0-1717436120295.png

 

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Phineas - I am sure you have already followed some of these steps, but writing them all out for completeness:

     

    1. Insert a Dropdown control into the DataCard for the DateTime field

    2. In the Items property of the Dropdown control, enter: 

    ["AM", "PM"]

     

    3. Set the Default property of the above to:

    If(
     Hour(Parent.Default) < 12,
     "AM",
     "PM"
    )

     

    4. Modify the Items in the Hour Dropdown control to: 

    ["12","01","02","03","04","05","06","07","08","09","10","11"]

     

    5. Set the Default property of the Hour control to:

     

    Text(
     If(
     Mod(
     Hour(Parent.Default),
     12
     ) = 0,
     12,
     Mod(
     Hour(Parent.Default),
     12
     )
     ),
     "0"
    )

     

    6. Set the DataCard  Update property to:

     

    If(
     Not IsBlank(DateValue1.SelectedDate),
     DateValue1.SelectedDate + Time(
     If(
     'Your AM-PM Dropdown'.Selected.Value = "PM",
     12,
     0
     ) + Mod(
     Value(HourValue1.Selected.Value),
     12
     ),
     Value(MinuteValue1.Selected.Value),
     0
     )
    )
    
  • Phineas Profile Picture
    5,331 Moderator on at

    Edited Reply -
    I made the changes suggested.

    I am still getting one error, regarding the semi-colon " : ".

    I can't tell if the error is referencing one of them or all of them.

    How do I determine/correct this issue?

    Phineas_0-1717508506639.png


    *************************************************************************************************************************
    Further troubleshooting leads me to believe the issue may be the incoming 'existing' data.

    Below is an excerpt from the SharePoint list. The circled field shows some existing data. This data has the date and time (with the include time toggle set to true).

    Could this be the issue? If yes, how do I correct so that I can retrieve the existing data while being able to retain the changes in the app? 

    Phineas_2-1717509364459.png


    Meanwhile the data in the 'Edit' form is as follows and doesn't show the same time as the SharePoint list.

    Phineas_4-1717509790686.png

     

     

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Phineas - could you create a new screen and insert a new EditForm control with the DataCard for the Date field included, and then try the solution again. I suspect there is some undetermined modification in your EditForm which is causing the problem.

  • Verified answer
    Phineas Profile Picture
    5,331 Moderator on at

    I edited the formula in each DataCard 'Update' property to start with DateTimeValue.

    This seems to have resolved the issue. I am still testing.

    DateTimeValue(DateValue1.SelectedDate + HourValue1.Selected.Value & ":" & MinuteValue1.Selected.Value)

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 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard