SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 First sunday of June
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kishoremcp
Starting Member

India
39 Posts

Posted - 11/20/2013 :  05:01:45  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 11/20/2013 :  08:13:38  Show Profile  Reply with Quote
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

India
39 Posts

Posted - 11/20/2013 :  08:17:30  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 11/20/2013 :  09:00:41  Show Profile  Reply with Quote
No problem..just was being curios!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000