Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Querying AX Data

(0) ShareShare
ReportReport
Posted on by 2

Hi,

How can I query data based on the last modified date time field. i am using AIF services to retrieve data but it isn't allowing me to query on the last modified date.

It says that the PurchTable does not have a field named modifiedDateTime.

Thanks

*This post is locked for comments

  • Dick Wenning Profile Picture
    8,705 Moderator on at
    RE: Querying AX Data

    System.DateTime netDttm;

       utcdatetime xppDttm;

       str xppString;

       ;

       xppDttm = 2007-06-05T23:22:21; // ISO standard format.

       // Convert X++ to .NET.

       netDttm = Global::utcDateTime2SystemDateTime(xppDttm);

       // Convert .NET to X++.

       xppDttm = Global::CLRSystemDateTime2UtcDateTime(netDttm);

       xppString = DateTimeUtil::toStr(xppDttm);

       info("xppDttm: " + xppString);

  • dynamics developer Profile Picture
    2 on at
    RE: Querying AX Data

    Thanks Dick Wenning for your reply. But i am writing code in C# and using AIF to query data from AX.

  • Dick Wenning Profile Picture
    8,705 Moderator on at
    RE: Querying AX Data

    from code:

       utcdatetime utc3 = str2datetime( "1985/02/25 23:04:59" ,2131 );

       str Temp = datetime2str( utc3 );

    ore use SysQueryRangeUtil class in the range of the query, do you know how to use?

  • dynamics developer Profile Picture
    2 on at
    RE: Querying AX Data

    Hi

    now it keeps giving the error

    "The UTC date/time string is not in the expected format"

    Can you tell me what is the correct format for querying?

  • dynamics developer Profile Picture
    2 on at
    RE: Querying AX Data

    Thanks Andre

    I really need this field because i am integrating POs with another application based on last modified.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    293,276 Super User 2025 Season 1 on at
    RE: Querying AX Data

    Hi,

    Check the table property 'ModifiedDateTime'. This might be standard not enabled (No). Then this field is not availabe. If you set the parameter to Yes, the field is enabled. All already existing records will not have this field filled. Future records will have it. Please note that updating this field will cost some time and can in some cases badly influence your performance.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,276 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,975 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans