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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Null value for Date Va...
Power Apps
Unanswered

Null value for Date Variable

(1) ShareShare
ReportReport
Posted on by 55

setting  varDate=datepicker.selecteddate but want to set varDate to be blank if a tick box "No date required" is selected

 

but set(varDate,"") comes up with "imcompatible type" error

 

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Null value for Date Variable

    Hi @fless1,

    check this out https://powerusers.microsoft.com/t5/General-Discussion/Update-blank-Null-value-to-fields-Date-User-Choice-field-etc-in/m-p/116448/highlight/false#M41488

    it may be the answer you are looking for. If it works, please mark this thread as solved.

  • fless1 Profile Picture
    55 on at
    Re: Null value for Date Variable
    Thanks loads
  • cbrazenec Profile Picture
    10 on at
    Re: Null value for Date Variable

    Instead of "", use Date(Blank(),Blank(),Blank()).  Sets it to null value, but in a date format.

  • takolota1 Profile Picture
    4,974 Moderator on at
    Re: Null value for Date Variable

    None of these answers worked for me and I really did not want to recreate the date columns in separate text columns.

    I had to use this formula on the submit button:

    SubmitForm(Form1); If(Or(IsBlankOrError(DataCardValue8.SelectedDate), IsBlankOrError(DataCardValue9.SelectedDate)), RecordsRetentionSetNullDates.Run(RecordsRetentionList.Selected.ID, IsBlank(DataCardValue8.SelectedDate), IsBlank(DataCardValue9.SelectedDate)), "");

     

    And set up a corresponding flow to input those null values in the date fields.

    takolota_0-1646780447245.png

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard