Search
 
SCRIPT & CODE EXAMPLE
 

SQL

dateadd in sql

SELECT DATEADD(year, 1, '2017/08/25') AS DateAdd;
--result
2018-08-25 00:00:00.000

SELECT DATEADD(year, -1, '2017/08/25') AS DateAdd;
--result
2016-08-25 00:00:00.000
Comment

PREVIOUS NEXT
Code Example
Sql :: how to get the date diff on once field in sql server 
Sql :: mysql database is not starting in xampp 
Sql :: oracle insert into 
Sql :: mysql alter table add column first 
Sql :: sqlite data types 
Sql :: mysql subdate 
Sql :: update from table tsql 
Sql :: show all tables postgres 
Sql :: mysql case when on date 
Sql :: order by desc postgres 
Sql :: create a view in sqlite 
Sql :: mysql change password 
Sql :: sql alter type of column 
Sql :: update query in sql server 
Sql :: mysql multiple count 
Sql :: string to sql timestamp 
Sql :: sql select where more than one record exists 
Sql :: postgres list databases 
Sql :: mysql terminal run sql file 
Sql :: mysql isnull 
Sql :: how to retrive the today date sql 
Sql :: mysql update with join 
Sql :: kill session inactive oracle 
Sql :: oracle to_char number format percentage 
Sql :: sql groub by count 
Sql :: mysql update two tables at once 
Sql :: sql lag 
Sql :: oracle apex debug time 
Sql :: sql show table info 
Sql :: how to combine 2 tables in mysql 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =