====== MSSQL GetDateOnly ====== * Function returns date part of the datetime. set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: Tomas Borovicka -- Create date: 14.4.2009 -- Description: -- ============================================= ALTER FUNCTION [dbo].[GetDateOnly](@date DATETIME) RETURNS DATETIME AS BEGIN RETURN CONVERT(datetime,CONVERT(VARCHAR(25), @date, 104),104) END