Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 First sunday of June

Author  Topic 

kishoremcp
Starting Member

41 Posts

Posted - 2013-11-20 : 05:01:45
Hi,

How to get first sunday of june dynamically?

using getdate()



Regards
Kishore

edit: moved to proper forum

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-20 : 08:13:38
are these interview questions?

SELECT DATEADD(dd,(DATEDIFF(dd,0,DATEADD(mm,5,DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)))/7 * 7 )+6,0)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

kishoremcp
Starting Member

41 Posts

Posted - 2013-11-20 : 08:17:30
I am sorry....Just a part of my requirement in a small project. I am taking your help because I am in learning phase and I am trying to learn.

Thanks for your help Visakh16.



Regards
Kishore
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-20 : 09:00:41
No problem..just was being curios!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -