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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Want to display Created Date, not CreatedDateTime on report

(0) ShareShare
ReportReport
Posted on by

Im new to AX2009, we are currently on 3.0.  I'm trying to put the Created Date of a Sales Order on a report and just display it as a date.  Been looking for some sample code.

*This post is locked for comments

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

    Hi Michelle,

    Welcome!


    There are a few ways to do this.  One without coding anything or you can do it by code.

    1.  If you have salesTable as a datasource in your query for your report, you can simply drag and drop (MorphX) the createdDate field into a section of your report.

     

    2.  Can create a display method like the following

                 a.  If you do have salesTable as a datasource:

    display date displaySODate()

    {
            ;   

            return salesTable.createdDate;
    }

              b.  If you do not have salesTable as a datasource

    display date displaySODate()
    {
       
        return SalesTable::find("YourSONumber").createdDate;
    }

    // Where "YourSONumber" can be set using some variable you get from your query.

     

    Then you have to add a date control to a section of your report and assign the control the data method, which can be set in the controls properties.

    Hope this helps.

    Kind regards.

  • Suggested answer
    Community Member Profile Picture
    on at

    Also, check class DateTimeUtil for how to convert createdDateTime to just date.  Sry didn't read the subject of your post.  :)

    DateTimeUtil::date(DateTimeUtil::utcNow());

    Not quite sure this is available in 3.0 however...?

    Kent

     

    EDIT:  Actually I believe createdDateTime field was introduced in AX 2009, so you shouldn't have to convert at all if you are on 3.0...?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans