Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to Convert string date time to date format

(0) ShareShare
ReportReport
Posted on by

Hi There

i am creating some fetch xml reports , the out put of the date values in string format how do i convert them into date format. Thanks

*This post is locked for comments

  • RE: How to Convert string date time to date format

    Hi ...  I used

    =DateTime.Parse

    It is working fine on my machine inBIDS .. but when I upload rdl report to online CRM it gives error :

    The report server has RDLSandboxing enabled and the Field expression for the dataset 'DataSet1' contains a reference to a type, namespace, or member 'Parse' that is not allowed. Change the expression to include only allowed namespaces, types, and members.

  • Royal King Profile Picture
    Royal King 27,686 on at
    RE: How to Convert string date time to date format

    DatePart("ww", Fields!createdonValue.Value)

  • NKC Profile Picture
    NKC on at
    RE: How to Convert string date time to date format

    hi issue was solved i used following expressions

    =Format(Fields!scheduledstartValue.Value,"dd/MM/yyyy") -------date

    =Format(Fields!scheduledstartValue.Value,"ddd")________________day

    i want to calculate week number any idea how to calculate week numbers? Thanks

  • Aileen Gusni Profile Picture
    Aileen Gusni 44,524 on at
    RE: How to Convert string date time to date format

    Hi,

    You can either using code (expression in SSRS)

    =DateTime.Parse(Fields!DateTimeinStringFormat.Value)

    =Format(Fields!Time.Value, "dd/MM/yyyy hh:mm:ss tt" )

    =FormatDateTime(Fields!startdate.Value,DateFormat.GeneralDate)

    See this link: http://msdn.microsoft.com/en-us/library/dd255246.aspx

    or you can try use this one,
    for simple format (non dynamic condition), you can use this Textbox properties:

    ssrsstring2.png

    or custom

    Please see this blog for detailed format:

    http://dattatreysindol.com/2011/02/10/formatting-date-and-time-in-sql-server-reporting-services-ssrs-reports/

    Thank you.

  • Suggested answer
    Royal King Profile Picture
    Royal King 27,686 on at
    RE: How to Convert string date time to date format

    use the below function to convert strign to date time

    =DateTime.Parse(Fields!DateTimeinStringFormat.Value)

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans