Global.ueuo.com
 Home 
 
 FreeOnlineBooks 
 
 FreeOnlineSoftware 
 
 InterviewQuestions 
 
 Dotnet 
 
 Java 
 
 PHP 
 
 SqlServer 
 
 ContactUs 
Interview Questions
  • Dotnet InterveiwQuestions
  • JAVA InterveiwQuestions
  •  
  • PHP Interview Questions
  •  
  • Database Interview Questions  
  •  
  • HTML Interview Questions
  • Latest Dotnet Projects
  • Online Tenders
  • Intranet Messaging
  •  
  • Social Networking Website - Friends.Com
  •  
  • Appointments Scheduler  
  •  
  • YourBlogs.com  

  • (*) Free Softwares  (*) FreeOnlineBooks  (*) SourceCodes  (*) Articals  (*) Games  (*) Projects  (*) Greetings  (*) Tutorials  (*) Programs  (*) Fourms 
    SqlServer Query
    
    SQL First and Last Day Of a Month  

    SQL First and Last Day Of a Month In This SQL Tutorial show you retrieve First Day and Last Day for a month using SQL Query. It can dynamically to retrieve First Day and Last day for a month using SQL Query. Example SQL Statement or Query below show you how to retrieve First Day or Last Day for a month. To display the date in different format, click here. DECLARE @Today DATETIME SELECT @Today = '6/17/2007' Get First Day of a Month Using SQL Query SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,-3,@Today)) Value = 2007-03-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,-2,@Today)) Value = 2007-04-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,-1,@Today)) Value = 2007-05-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,0,@Today)) Value = 2007-06-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,1,@Today)) Value = 2007-07-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,2,@Today)) Value = 2007-08-01 00:00:00.000 SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Today))-1),DATEADD(mm,3,@Today)) Value = 2007-09-01 00:00:00.000 Get Last Day of a Month Using SQL Query SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,-2,@Today)) Value = 2007-03-31 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,-1,@Today)) Value = 2007-04-30 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,0,@Today)) Value = 2007-05-31 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,1,@Today)) Value = 2007-06-30 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,2,@Today)) Value = 2007-07-31 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,3,@Today)) Value = 2007-08-31 00:00:00.000 SELECT DATEADD(dd, -DAY(DATEADD(m,1,@Today)), DATEADD(m,4,@Today)) Value = 2007-09-30 00:00:00.000
    Latest SqlServerQuerys
    .Net Technologies
  • Simple Web Service Authentication using SOAP Headers
  •  
  • Introduction to Remoting  
  •  
  • XML serialization and Binary serialization
  •  
  • 3-Tier architecture  
  • Java Technologies
  • Creating a Servlet without any IDE
  • Getting Started With Java
  •  
  • Introduction To Struts  
  •  
  • Web Service with AXIS