Other recent Dynamics AX Blog postings

Mittwoch, April 12, 2006

Specifying empty date values

If you want to set a date field to an empty date or need to compare if a date field is empty, you can use the datenull() function. It is a method of the Global class and will simply return 01\01\1900.

This leads to more things:
  1. You can write dates in Axapta X++ editor using backslashes, e.g. 14\04\2006
  2. An empty date in Axapta is specified as January 1st, 1900.
  3. You can use methods from the Global class without having to write "Global::". So, you can write "if date == datenull()" and you do not have to write "if date == Global::datenull()". This works with all the methods from the Global class.

1 Kommentar:

Unknown hat gesagt…

is it possible to send nothing not even 1/1/1900? If the date is null?