Mega Code Archive

 
Categories / Delphi / Examples
 

Decrementing a datetime field in paradox

There is a bug in Local SQL on Paradox: Executing an Update statement on a Paradox table where '1' is being subtracted in a datetime field does not subtract '1', but rather adds '1'. // this will ADD one! UPDATE SAMPLE.DB SET DT = DT - 1 // the following workaround will give the correct result: UPDATE SAMPLE.DB SET DT = DT + (-1)