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 :
Microsoft Dynamics CRM (Archived)

Format date to "yyyy/MM/dd"

(0) ShareShare
ReportReport
Posted on by

I am trying to display date on my report (pdf) as "yyyy/MM/dd" in CRM dyanmics.

I tried the following:

=Format(Fields!From.Value, "yyyy/MM/dd" )   -- returns literal yyyy/MM/dd

= DateSerial(DatePart("yyyy", Fields!From.Value) + 0, DatePart("m", Fields!From.Value) + 0, DatePart("d", Fields!From.Value) + 0)  -- returns 5/4/2016 12:00:00 AM

= CDate( Year(Fields!From.Value) + "/" + Month(Fields!From.Value)  + "/" + Day(Fields!From.Value) ) -- returns Err: converstion from 'Double' to 'Date' requires caling the 'Date.FromOADate'  method

I tried setting the format at the field level, in custom formatting, but it always comes back as  "mm/dd/yyyy"

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Can you try below

    =Format( Fields!From.Value ,"yyyy-MM-dd")

    =Format(CDATE( Fields!From.Value ),"yyyy-MM-dd")

  • Verified answer
    Community Member Profile Picture
    on at

    Everyone who is looking for on how to format date in specific format in CRM dyanmics, here you go:

    =Format(Fields!From.Value, Year(Fields!From.Value).ToString() + "/" + Month(Fields!From.Value).ToString()  + "/" + Day(Fields!From.Value).ToString())

    this will display your date in "yyyy/MM/dd" format!

  • Verified answer
    Community Member Profile Picture
    on at

    This worked too:

    =Format(CDATE( Fields!From.Value ),"yyyy-MM-dd")

    but not the =Format( Fields!From.Value ,"yyyy-MM-dd")

    Thanks,

    Alexa

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans