Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server number of days in year function


DAYSINYEAR

Updated: 18 September 2014

Use the scalar function DAYSINYEAR to return the number of days in the year of the specified date.
Syntax
SELECT [wct].[DAYSINYEAR](
   <@StartDate, datetime,>)
Arguments
@StartDate
the specified date. @StartDate is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
Return Type
int
Remarks
·         If @StartDate is NULL then @StartDate = GETDATE()
Examples
SELECT
       wct.DAYSINYEAR('2014-09-18')
This produces the following result.
-----------
365

 

See Also

 



Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service