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)

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

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,018 Super User 2025 Season 2 on at

    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.

  • dynamics developer Profile Picture
    2 on at

    Thanks Andre

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

  • dynamics developer Profile Picture
    2 on at

    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?

  • Dick Wenning Profile Picture
    8,705 Moderator on at

    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

    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

    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);

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans