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 :
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

I have the same question (0)
  • Suggested answer
    Komi Siabi Profile Picture
    13,109 Most Valuable Professional on at

    Hello Ahmed,

    You can use

    time2str(timenow(),1,1)

    Komi,

    Regards.

  • ergun sahin Profile Picture
    8,826 Moderator on at

    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
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

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

    timenow() would give you time, not date.

  • Community Member Profile Picture
    on at

    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!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans