Compare datetime

Dear User,

In a IF statement, How can I compare 2 dateTime variable in a same table.

You can not directly compare two date type variable. You take an Integer type variable than subtract two dates.now apply your IF condition according to sign.

Hi,

you can compare Datetime (as well as Date-) Variables directly.

E.g.(Table1 is your Table, DT_Field1 and DT_Field2 are your Datetime-Fields in that Table):

Table1.GET(key);

IF Table1.DT_Field1 = Table1.DT_Field2 THEN

That is not true.