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 / Converting date to tex...
Power Apps
Answered

Converting date to text or text to date?

(0) ShareShare
ReportReport
Posted on by 802

Hi,

 

I am building a desk booking app, and want to write back to the Dataverse table when someone has used the QR code to checkin to their desk. This is using First+Filter so that only the user who has booked the desk originally can update the Dataverse.

 

On the Confirm button's OnSelect property, I keep getting an error message of "Incompatible types for comparison. These types can't be compared: Date, Text"...    The column type of 'LDN_Desk_Reservation_Date' is Date Only. 

 

Here is the formula - the lblBookingDate just has a value of "Today()"  but it won't work due to the above error message...

 

Patch(
LDN_Desk_Reservations,
First(Filter(LDN_Desk_Reservations, 'Desk Reference'= QRValue.Text && 'LDN Desk Reserved For' = User().FullName && 'LDN Desk Reservation Date' = lblBookingDate))),
{'Check In Status': "Checked In"}
);

 

Any ideas?

 

Thanks

K.

Categories:
  • Verified answer
    shoog Profile Picture
    2,164 on at

    Assuming lblBookingDate is a label, you would have to use DateValue(lblBookingDate.Text) to get the date value from it.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Kosenurm 

    Why not use Today() in your formula instead of lblBookingDate or use a datepicker control instead of a textbox? 

  • Vikas_Sharma Profile Picture
    42 on at

    Hi @Kosenurm 

    To convert the date value in the text  you can use Text(),

    lblBookingDate is in text format and 'LDN_Desk_Reservation_Date' in date format so you can use 

    Text('LDN_Desk_Reservation_Date') for comparison.

    Hope this will work.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard