Unfortunately, none of the two suggestion above will do what DATEDIFF does... You need to separate the DATE part of your time value. You didn't say what data type you use for your date/time variables. The easiest way, I think, is to convert both dates to COleDateTime (which wraps double representation of date/time), truncate the fractional part and simply subtract one value from another.
----------------------------- Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com