web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Date conversation using SSRS expression

(0) ShareShare
ReportReport
Posted on by 15

I have a date field when extracted using fetch XML query gives 01/15/2009 as a string. When I try to convert it to date using cdate it gives error.i tried using format, formatdatetime, from the configuration by setting the custom date format but it dint work.it gives #error.

If I try to convert the field.Value using cdate it works and converts to date, but then the value is not correct as the field in crm is saved with datetime behaviour as user local. So the date varies by +/- 1 day based on the region.

My question is like if I am able to retrieve the date as string m/dd/yyyy why it is not allowing me to use cdate to convert to date so then I can use format function to display accordingly.

•I want to display as  20-january-2020

•When used expression as =field!fieldname.value it shows 1/20/2020

And if used cdate(=field!fieldname.value) gives #error

•when used expression as=field!fieldnamevalue.value it shows 1/19/2020 ( +/-1 day)

Please let me know if any solution

Thanks

 

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    I think you don't need to use an expression to calculate your date with the "20-january-2020" format. You can use the following steps: 

    1- Right click + textbox properties 

    0310.pastedimage1617900339981v3.png

    2- Select the format you want

    3480.pastedimage1617900414348v4.png

    Then go to the custom category to customize your selected format: 

    6560.pastedimage1617900472186v5.png

    Result: 

    4377.pastedimage1617900512162v6.png

  • PN_100 Profile Picture
    15 on at

    Thanks for the reply. I had tried this first thing.but it dint work for me.

    If I use that as well the date I get is 1/20/2020 not according to format I set

  • PN_100 Profile Picture
    15 on at

    Cdate did not work because personalised setting for date format was different so it was not able to interprete the date. Changed report language to user! language

    Working fine now.thanks

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans