Last post Nov 06, 2003 01:22 AM by limsuwan
Nov 05, 2003 12:54 AM|limsuwan|LINK
Nov 05, 2003 11:58 AM|daccardo|LINK
Syntax DATEDIFF ( datepart , startdate , enddate ) Arguments datepart is the parameter that specifies on which part of the date to calculate the difference. The table lists dateparts and abbreviations recognized by Microsoft® SQL Server™.
Datepart Abbreviations Year yy, yyyy quarter qq, q Month mm, m dayofyear dy, y Day dd, d Week wk, ww Hour hh minute mi, n second ss, s millisecond ms
startdate is the beginning date for the calculation. startdate is an expression that returns a datetime or smalldatetime value, or a character string in a date format. Because smalldatetime is accurate only to the minute, when a smalldatetime value is
used, seconds and milliseconds are always 0. enddate is the ending date for the calculation. enddate is an expression that returns a datetime or smalldatetime value, or a character string in a date format.
Nov 06, 2003 01:22 AM|limsuwan|LINK