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 / Null value for Date Va...
Power Apps
Answered

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

    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
    Thanks loads
  • cbrazenec Profile Picture
    10 on at

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

  • takolota1 Profile Picture
    4,980 Moderator on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard