Assert procedure that takes actual and expected DATETIME values, compares them for equality and report failure if they are not equal

Note: If actual or expected, or both values are NULL then assert will fail. 

Arguments

  • V_ActualValue - actual value, DATETIME
  • V_ExpectedValue - expected value, DATETIME
  • v_UserMessage – message to report when assertion fails, NVARCHAR(MAX)

 

Examples

SQL Server

      EXEC DBTD_ASSERT_DATETIME_ARE_EQUAL '2013/01/01 00:05:20.000', '2013-01-01 00:00:01.123', ‘Values should be the same’;

 

See Also