Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to get system Current Date in ax2012

(0) ShareShare
ReportReport
Posted on by 46

Hey,
In Dynamics ax2012, I want when click on check box then field From Date and To Date automatically get current system date.

How can do? Please help me.
Thanks!

pastedimage1659770782807v1.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to get system Current Date in ax2012

    Is it a form or a dialog? Anyways, you need to override the modified method of the Current date. In that method, check if the flag is true, and based on that you can use DateTimeUtil::utcNow() top populate the Active from and Active to fields.

    Hope this helps!

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,433 Most Valuable Professional on at
    RE: How to get system Current Date in ax2012

    To get the date, you can use systemDateGet(), for example.

    timenow() would give you time, not date.

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: How to get system Current Date in ax2012

    It's not clear but I think you have a form and 3 unbound control. Then;

    Set from and To controls Auto Decleration property to YES

    At the CurrentDate's modified method, check CurrentDate's value and set other values.

  • Suggested answer
    Komi Siabi Profile Picture
    Komi Siabi 12,738 Most Valuable Professional on at
    RE: How to get system Current Date in ax2012

    Hello Ahmed,

    You can use

    time2str(timenow(),1,1)

    Komi,

    Regards.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans