web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,049 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.

  • ergun sahin Profile Picture
    8,824 Moderator 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
    Martin Dráb Profile Picture
    236,394 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.

  • Community Member Profile Picture
    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!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,004

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 548 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans