Antoine
Member since Dec 11, 2008
- Profile: /members/1339-antoine.htm
- URL: http://www.ilionx.com
- Comments: 1
Recent Blog Comments By Antoine
-
Getting Only the Date Part of a Date/Time Stamp in SQL Server
Posted on Dec 4, 2006 at 6:34 AM
The UDF contains a small error. I couldn't create it. I had to replace the '-1' with just a '-'. And then I discovered it always results in a datetime with the time set to '01:00:00' So it should be: CREATE FUNCTION DateOnly(@date) RETURNS datetime WITH SCHEMABINDING as return DATEADD(ms, - DATEP... read more »