/ Microsoft / How to create date using x++

How to create date using x++

Learn, share and spread knowledge

In every programming language, playing with date and time is always complex. As, date has different formats, different regional norms to write and more importantly different ways to store in the memory. In my this article, you will learn how to create date using x++.

Let’s start!

I am sharing a function of x++ which needs three arguments and all in integer data type. These arguments are as follows:

  • day
  • month
  • year

Now, you need to pass these three arguments to the mkDate(int day, int month, int year) function of x++. See the code below:

mkDate(1,12,1900)));
info(strFmt("%1", mkDate(1,12,1900)));

So, in this way you can create date using x++. Moreover, if this helps you, please Like, Comment and Share to help other people.

Note: I have tested this code is tested in D365FO but not in AX 2012.

If you found any ambiguity or a better solution, please feel free to ask.

Blog: Click here

YouTube: Click here

GitHub: Click here

2 POST COMMENT

Send Us A Message Here

Your email address will not be published. Required fields are marked *

2 Comments

NevoiTech Blog

A blog by Moeen Ahmed SultanNevoiTech logo

To hire freelancer or get personal training

of

Call/WhatsApp: +92 321 458 9595

Email: info@nevoitech.com