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 AX (Archived)

SSRS Report: How Do I Change the Format of "TransDate" from (mm/dd/yyyy) TO (dd/mm/yyyy) Form in My Report?

(0) ShareShare
ReportReport
Posted on by 1,036

Hello awesome community i'm new to AX and report development i'm still learning and I seek your help if you please :)

I'm developing an SSRS report using DP class, I have a "TransDate" field from LedgerJournalTrans Table but it shows on like this: 

Help-new-6.PNG 

I have tried to change it in Visual Studio using this window:

HElp-new-7.PNG 

But it did not have a dd/mm/yyyy option unfortunately.

I believe it should be done in DP class with code, if you show me the code or refer me to a reference, it would be appreciated

Thanks in advance!

*This post is locked for comments

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

    You can use the function: Date2Str().

    Is a global function and you can set the parameters to return the value the way you need:

    static void Job2(Args _args)

    {

       date currentDate = today();

       str s;

       int iEnum;

       ;

       s = date2Str

           (currentDate,

           321,

           DateDay::Digits2,

           DateSeparator::Hyphen, // separator1

           DateMonth::Digits2,

           DateSeparator::Hyphen, // separator2

           DateYear::Digits4

           );

       info("Today is:  " + s);

    }

    /** Example Infolog output

    Message (12:36:21 pm)

    Today is:  2009-01-13

    **/

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Hi,

    You can do this in many ways, without any line of code.

    with the current way, that you are trying, select the last choice called 'Custom' and then in the empty box add dd/MM/yyyy

    that should work for you.

  • Verified answer
    Sebastian Mankowski Profile Picture
    305 on at

    Hi Momochi...

    I can see two ways to achieve your goal:

    1. You can use TextBox expression and use following command: =FORMAT(Fields!Dataset_Field_Name_Here.Value,"dd/MM/yyyy")

    2. Use TextBox Custom format as presented on following screen: 

    xJZlu.jpg

    Let me know if any of the above works for you.

    Sebastian

  • Verified answer
    startax Profile Picture
    1,845 on at

    Hi Momochi,

    Sohaib Cheema is right no need to write code in DP class. You can achieve this by Custom option in format put "dd/MM/yyyy"

  • Momochi Profile Picture
    1,036 on at

    Works like a charm! simple and straight forward thank you guys for your kind help and time!

  • TestBot Profile Picture
    950 on at

    Hi,

    What about if my date field is a string and i need to print in dd/MM/yyyy format in a report?

    how to acheive this scenario?pls suggest

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans