HELP please str2date

good morning,
I’m new on ax.

I’ve a question.

CommissionCalc.FromDate <= createddate && (CommissionCalc.ToDate == str2date(’ ',123)

Ax doesn’t take the str2date(’ ',123) and i need to compare this two field.
In my database when the date is empty the field is setting to 01/01/1900 but i tried to do both of them but nothing the output it’s different from what i what.
Someone can help me!

Hello Andrea,

  • If you want to check whether date is empty, use ‘datenull()’ method in Global class.

  • str2Date function as the name indicates converts a text string to a date. Therefore an empty string cannot be passed to this function. Here are some examples -

    • str2date(‘01.01.’+int2str(year(systemdateget())),123);
    • str2date(@“30-06-” + int2str(year(today())), 123);

Regards,

ok thanks a lot!
have a nice day