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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Liquid error: Object of type 'System.DateTime' cannot be converted to type 'System.String'.

(0) ShareShare
ReportReport
Posted on by 11

I'm trying to get birthDate (and other date fields) of portal user(contact) in liquid in a content snippet, it give me the error "Liquid error: Object of type 'System.DateTime' cannot be converted to type 'System.String'.

firstname and lastname works fine.

Any help?

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Liquid error: Object of type 'System.DateTime' cannot be converted to type 'System.String'.

    Hi Siddique,

    I can use {{ user.createdon}} to get create date of contact in liquid directly.

     pastedimage1631241347058v4.png

    pastedimage1631241389550v5.png

  • Siddique mahsud Profile Picture
    11 on at
    RE: Liquid error: Object of type 'System.DateTime' cannot be converted to type 'System.String'.

    thank you Leah, for the quick response.

    I still get the same error, tried the same as you showed it's not working on my side.

    Code:
    pastedimage1631253585812v1.png

    Output:
    pastedimage1631253613658v2.png

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Liquid error: Object of type 'System.DateTime' cannot be converted to type 'System.String'.

    Hi Siddique,

    It's so strange.

    Maybe you can try to edit page in portal directly, not in the portal management.

    Log in portal with administrator, and go to the page you want to click 'Edit'.

    pastedimage1631256634636v1.png

    Open page copy dialog to add code:

    pastedimage1631256767089v2.png

    Save it.

    pastedimage1631256842927v3.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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 337

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 104 User Group Leader

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 79 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans