Over a million developers have joined DZone.

DateOnly

·

-- Gets the date part of a datetime input
-- Created 08/05/04 by Oskar Austegard
ALTER FUNCTION dbo.fnDateOnly
(
	@DateTime datetime --The input date whose date part we want
)
RETURNS datetime
AS
BEGIN
	RETURN (CONVERT(datetime, CONVERT(varchar(10), @DateTime, 101)))
END


Oskar Austegard
http://mo.notono.us
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}