Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server 2008 first and last day of month

SELECT DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)  ----First Day
SELECT DATEADD (dd, -1, DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) + 1, 0)) ----Last Day
Comment

PREVIOUS NEXT
Code Example
Sql :: get table column names sql laravel 
Sql :: mysql shell ERROR: Not connected. 
Sql :: get first 3 letter of department name in sql 
Sql :: remove transient options sql wordpress 
Sql :: oracle create program if no exists 
Sql :: sql query to find duplicate email address 
Sql :: create column sql 
Sql :: mysql change primary key 
Sql :: mysql all columns 
Sql :: backup ms sql database table data to file 
Sql :: oracle ORA-00054 origin 
Sql :: oracle grants 
Sql :: sql asynchronous stored procedure call 
Sql :: sql delete multiple conditions 
Sql :: sql server select where date 
Sql :: org.h2.jdbc.JdbcSQLSyntaxErrorException 
Sql :: add unique constraint sql server multiple columns 
Sql :: mysql incrementation 
Sql :: how to change mysql root password in windows 10 
Sql :: how to create table in sql 
Sql :: change default role snowflake 
Sql :: postgresql list users 
Sql :: replace all numbers in mysql 
Sql :: sql group by year 
Sql :: date formats in sql server 
Sql :: mysql order 
Sql :: install beautifulsoup from terminal 
Sql :: duplicate table sql 
Sql :: create table in mysql 
Sql :: reseed sql table primary key 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =