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 / datepicker to text col...
Power Apps
Answered

datepicker to text column in sharepoint

(0) ShareShare
ReportReport
Posted on by 603

Hi All,

 

I've a question about the datepicker option.

In my app I've two datepickers, and I want to patch them (and some other fields) to a SharePoint list.

The SharePoint list columns are all text columns.

 

I want to patch the selected date as text to my SharePoint column, for this I use the code below:

 

Patch(SharePointListName,Defaults(SharePointListName),{textcolumn:datepicker1.SelectedDate})

 

But I got an error when I patch this that says: 

Object must implement IConvertible

 

Anyone know what I need to do?

 

Thanks in advance.

 

Categories:
  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @dennisb88 ,

    I don't know your date format, but adjust this to suit

    Patch(
     SharePointListName,
     Defaults(SharePointListName),
     {
     textcolumn:
     Text(datepicker1.SelectedDate,"[$-en]dd/mm/yyyy")
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • dennisb88 Profile Picture
    603 on at

    Hi @WarrenBelz ,

     

    Thank you for your reply.

    The date time format is correct for me.

     

    I just give it a try, but I get the same issue. It still give me the "Object must implement IConvertible" issue when I tried to add it. 

  • Verified answer
    WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    @dennisb88 ,

    I assume you picked up the missing bracket (now fixed).

    This has to work if you are writing to a text field. Save and exit the app and come back in again.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard