5 pts.
 Substract two fields SmallDateTime at SQL Server
Hii.. IT Professional Helper, may i asked 1 question and hope IT Professional Helper can help me to answer my question? The Question is : Cm.CommandText = "Update Reminder Set IsDatang = 0, IsValid = 1 Where TglReminder - TglDatangKembali > 7" Cm.Execute If i get the error : Arithmetic overflow error converting expression to data type smalldatetime. Please Give me the right answer. Thank's

Software/Hardware used:
ASKED: April 30, 2009  2:29 AM
UPDATED: May 3, 2009  8:19 PM

Answer Wiki:
Seeing that you're talking about a date difference the following should be fine: <pre> ...Where DateDiff(day,TglDatangKembali, TglReminder) > 7 </pre>
Last Wiki Answer Submitted:  May 3, 2009  8:19 pm  by  msi77   1,610 pts.
All Answer Wiki Contributors:  msi77   1,610 pts. , Denny Cherry   64,505 pts. , alessandro.panzetta   9,660 pts. , carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _