﻿
/***********************************************************************************
* FUNCTION f_dateOnly
*
* restituisce solo la parte data di un campo datetime (ovvero a mezzanotte...)
*
***********************************************************************************/
create FUNCTION f_dateOnly
(
	@dateIn		DATETIME
)
RETURNS DATETIME
AS
	BEGIN
	RETURN dateadd(dd, -datediff(dd, @dateIn, 1), 1) 
	END
