SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Simple Function to get Date part of DATETIME value

By Neil Jacobson,

This is a simple function I use to get the month/day/year of a datetime value.

Select mydb.dbo.udfmmddyyyy(Getdate())

Note: This is easily modified for British/Australian date format.

Total article views: 1078 | Views in the last 30 days: 2