Date Value(01\01\1900)

Hi, Everyone

I have a requirement to set Date value as default in a table date field as 1\1\1900 but I have to try to create this value in the table this won’t pick it up. Please see the below code and give any suggestion.


    CustomTable      custom;   // Table buffer creation
    date d;                 
    //Transdate   _date;

    // _date = 01\01\1900;
     d = mkDate(1,1,1900);
     custom.DateValue  =  d;      // set date value to table date field
     //custom.DateValue = _date;
     custom.insert();               // insert operation perform

Thanks in Advance

u will write code in table init value method then u will get defalut date values.y u r insert date ?


public void initValue()


super(); null();//u want to null date (1,1,1900) , write this line in init value method. today/();//u want to today date , write this line in init value method.


I have tried your suggestion but it seems like same as above please find the below screenshot for your reference and please suggest some solution to rectify this

The empty value shown in table browser is the correct visualization of an empty date value (implemented in AX as 1/1/1900).

If you want to see actual text 1/1/1900, the problem us in your expectations, because AX considers this value as null.

For reference, I see this question was already discussed in another forum and it’s marked answered there.

Yes, I have to get your point and also searched the Google got some points too. they are the below and thanks for your clarification.

" /Get’s minimum/empty date (i.e. 1/1/1900).
//Tough for this one you are not able to see the output as 1/1/1900, but when you set this to
//database field you will see 1/1/1900 set in the date control.
info(strfmt(’%1’, Global::dateNull())); "