I used this UDF alot to return only the date part. I got from some site. It is also possible to get the time part mathematically. I just forget the URL though!
CREATE FUNCTION fn_Date (
@ADate datetime )
RETURNS datetime AS
BEGIN
declare @DateVal datetime
set @DateVal = CAST(FLOOR(CAST(@ADate AS float)) AS datetime)
return @DateVal
END
AUXilliary COMmunication 1