Forum Discussion

insandur's avatar
insandur
Helper II
1 year ago
Solved

Incompatible types for comparison - Date,Text in dropdown items power apps

Hi ,

 

I have a sharepoint column (Date column) and when using it in the dropdown value.

 

When i goto items and add filter   Date =  dropdown.selected.Value i get a error   

"Incompatible types for comparison - Date,Text"  .  

  • I see that you are trying to compare a date value with a text value and since your SharePoint column is a date type and the dropdown returns a text value (dropdown.selected.Value), you need to either convert the text to a date or the date to a text, depending on your needs.

     

    You can use the DateValue function to convert the text value from the dropdown to a date format before comparing it with your SharePoint date column.

     

    Filter(
        YourSharePointList,
        DateColumn = DateValue(Dropdown.Selected.Value)
    )

     

3 Replies

  • I see that you are trying to compare a date value with a text value and since your SharePoint column is a date type and the dropdown returns a text value (dropdown.selected.Value), you need to either convert the text to a date or the date to a text, depending on your needs.

     

    You can use the DateValue function to convert the text value from the dropdown to a date format before comparing it with your SharePoint date column.

     

    Filter(
        YourSharePointList,
        DateColumn = DateValue(Dropdown.Selected.Value)
    )

     

    • insandur's avatar
      insandur
      Helper II

      Thank You Amira,

       

      It worked well without error in Items, However i get error in my collect variable for that Date column collection