Monday, 15 March 2010

sql server - convert the number of the calendar day to date in SQL -



sql server - convert the number of the calendar day to date in SQL -

having 174 there way convert show finish date? example: 174 should 06/23/2014, 174th day of year. info looks 2014174. there sql function this?

thank

you can utilize dateadd function below, accomplish looking for.

declare @inputnumber int set @inputnumber = 174 select dateadd(day,(@inputnumber-1),'1/1/'+cast (year(getdate())as varchar(10)))

sql sql-server

No comments:

Post a Comment