Hi i always worked with php and my sql.
I just want to know is there any in-built functions for get day number of the year like today is 54 day of the year i am not able to find any this kind of in built function but i want to acheive this is there any way to do this.
· Date
you can do it like this select DATEDIFF(dd,cast(DATEPART(YYYY,GETDATE()) as varchar(5))+'-01-01',GETDATE())+1
Thanks this will help
The simplest solution is
select
datepart(dayofyear,GETDATE())
Thanks i never thought in this way... This will help me. I didn't know abt this function
[quote user="Ashish Gilhotra"]Thanks i never thought in this way... This will help me. I didn't know abt this function
You are welcome [:)]
Managed Windows Shared Hosting by OrcsWeb