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 / Patching empty date an...
Power Apps
Answered

Patching empty date and time pircker value

(0) ShareShare
ReportReport
Posted on by 66

Hi All,

In my form, I have a date and time picker (from a SP list) and I am trying to patch it.

This datacard is optional and my goal is to patch it only when the user selects date and time.

I am using the following formula to patch it:
IncidentTimeFrom:
If(
!IsBlank(DateValue(IncidentTimeFrom_DataCard3_1.DataField)),
DateValue5_1.SelectedDate +
Time(
Value(HourValue5_1.Selected.Value),
Value(MinuteValue5_1.Selected.Value),
0
)
)

If there is no date selected, this field is not patched, however, if the user selects the date, it is not patched either.
Any suggestions on what changes need to be made?

Your help is much appreciated!

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ekoz21 

    You are specifying the wrong property of your datacard.  DataField will be the name of the field, not a value thus it will always produce blank when trying to convert the text field name to a datevalue.

     

    Please consider changing your Formula to the following:

    If(
     !IsBlank(DateValue5_1.SelectedDate),
     DateValue5_1.SelectedDate + Time(Value(HourValue5_1.Selected.Value), Value(MinuteValue5_1.Selected.Value), 0)
    )

     

    However, the datepicker SHOULD be getting its Default date from the underlying field, so there would not really be a way to set it to blank from the user perspective.  This could be your next issue.

     

    I hope this is helpful for you.

  • ekoz21 Profile Picture
    66 on at

    Thank you! It works perfectly now 🙂

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard