In this article, I wrote some useful Date and Time User-Defined Functions. These scalar User-Defined Functions perform an operation on a date and time input value and return a string, numeric, or date and time value. DatePart Returns the date part of the datetime value. Arguments datepart Is the datetime value. TimePart Returns the time part of the datetime value.
Arguments datepart Is the datetime value.
FirstMonthDay Returns the first day of the month for the given date. Arguments date Is the datetime value. LastMonthDay Returns the last day of the month for the given date. Arguments date Is the datetime value. INT Media Group, Incorporated.