Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

how to get time from ( created field ) i.e date time . Using X++ Passing in excel report format

(0) ShareShare
ReportReport
Posted on by

help

  • Suggested answer
    Mohit Rampal Profile Picture
    12,558 Moderator on at
    RE: how to get time from ( created field ) i.e date time . Using X++ Passing in excel report format

    Hi Sachin, You can get time from Datetime as below but probably it will not be as per user's preferred timezone.

    DateTimeUtil::time(Table.CreatedDateTime)

    System code applies TimeZoneOffset as below. (Check writeDateTimeToLabel method of ProcessScheduleOccurrenceCardBuilder class)

    Timezone userTimeZone = DateTimeUtil::getUserPreferredTimeZone();
    ProcessScheduleDateTime userDateTime = DateTimeUtil::applyTimeZoneOffset(_datetime, userTimeZone);
    
    TimeOfDay userTime = DateTimeUtil::time(userDateTime);

  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: how to get time from ( created field ) i.e date time . Using X++ Passing in excel report format

    Hi Sachin mittal,

    Refer to the below link and see whether it helps.

    https://learn.microsoft.com/en-us/dotnet/api/dynamics.ax.application.datetimeutil.time#dynamics-ax-application-datetimeutil-time(microsoft-dynamics-ax-xpp-axshared-utcdatetime)

    Thanks,

    Girish S.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,325 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans