Function to truncate the time from the given date using SQL Server
ALTER FUNCTION [dbo].[TruncateTime]
(
@dateToConvert datetime
)
RETURNS datetime
AS
BEGIN
RETURN convert(datetime, convert(varchar(10), @dateToConvert, 101))
END
ALTER FUNCTION [dbo].[TruncateTime]
(
@dateToConvert datetime
)
RETURNS datetime
AS
BEGIN
RETURN convert(datetime, convert(varchar(10), @dateToConvert, 101))
END
No comments:
Post a Comment