sql add days to date

//Returns Date time
//Takes where to add (as in year, month, day, etc) to
//Takes how much to add
//Takes a datetime in some different formats
DATEADD(day, 1, '2017/08/25') 

4.14
7
Awgiedawgie 440215 points

                                    DATEADD(HOUR, 2, GETUTCDATE())

4.14 (7 Votes)
0
3.9
10
Phoenix Logan 186120 points

                                    SELECT GETDATE() 'Today', 
           DATEADD(day,-2,GETDATE()) 'Today - 2 Days'
SELECT GETDATE() 'Today', 
           DATEADD(dd,-2,GETDATE()) 'Today - 2 Days'
SELECT GETDATE() 'Today', 
           DATEADD(d,-2,GETDATE()) 'Today - 2 Days'

3.9 (10 Votes)
0
0
0
Awgiedawgie 440215 points

                                    UPDATE classes 
SET `date` = DATE_ADD(`date` , INTERVAL 2 DAY)
WHERE `id` = 161;

0
0
0
10
Awgiedawgie 440215 points

                                    SELECT GETDATE() - 1

0
0
3.73
10
Awgiedawgie 440215 points

                                    UPDATE classes 
SET `date` = DATE_ADD(`date`, INTERVAL 2 DAY)
WHERE id = 161

3.73 (11 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
add date in sql add days to now() mysql how to add day in datetime sql sql how to add one day add two days to current date in sql sql hours add one hour to date add a day to the date sql How do I add 10 years to a date in SQL? sql add 30 days to date date minus 1 year sql sql server getutcdate minus days mysql add days from date mysql datetime add 1 day sql where current date minus 1 day adding day to date sql mysql date add just working days datetime add days sql days add in date using mysql sql add 2 days to a date mysql date add day date add hours sql t sql add days to date sql server update date add days get date in sql and add days how to add date in sql mysql add a date how to add hours in datetime in sql server days add in sql server Add days to current data in sql server add 1 day mysql mysql add 10 days to date sql server datetime add hours sql add years to datetime add days to date mysql8 how to Add number to date in sql mysql date add 10 days sql server add 5 days to date how to add to dates in sql mysql add day date add days in mysql date ms sql getdate minus 1 month add date to mysql sql current date minus 1 month add day sql serer how to add 2 hours in sql sql datetime now minus days how to add in date mysql add date in sql statement sql add years to datte mysql add 1 to date add days to current date sql add plus days mysql how to add 2 hour to DAteTime in sql sql days add how to add date on sql sql query add days to date sql server where getdate minus 1 day sql server date add days current date add 10 days in sql how to add 10 years to a date in sql add days in date in sql how to date add in sql how to add 7 days in date in mysql sql dateadd days sql add 28 days to date sqll add days add a day to date mysql add hours to sql datetime how to date range minus 1 day in sql now date add days into current date in sql how to add +15 days to date column in sql sql where date add days how to add day in sql server date sql add to date how to add day in date sql mysql mysql add days add one day to date mysql mysql add dates days add in sql mysql date add 7 days sql add 10 years to date mysql add 10 days how to get the date with adding days to a date mysql getdate in sql add days how to add days in date in mysql how to add date is sql mysql date add one day more to current date sql server add one day to date add days to current date mysql query how to Add days to Date column in sql t-sql add days to current date mysql date plus days add one day to date in sql sql add an extra days to date how to add days to current date in mysql how to add 30 days to current date in mysql sql server current date minus 1 hour add 1 day to date mysql update date by adding days in sql access how to add days to date in mysql how to add years to a date in sql add day in mysql add days to mysql date write a sql to add 5 days to the current date add one day to date sql sql server subtract years from date how to add day in sql how to add day in date in sql date add with days in mysql get date minus days SQL mysql add to date sql query current date minus 1 year sql server add days to timestamp sql server current date minus 1 day add date for a sql query current date minus 1 day in sql how to add days in sql add days + mysql mysql add 3 days to a date add day to sql date add one hour to sql datetime how to add days in current month in mysql how to add days in month in mysql sql query to get add days in existing date field get date minus 1 day sql add days +sql server sql server add days to date mysql current date add days Add to MYSQL DAte adding days to MySQL ms sql get date minus 2 years sql get current date minus 1 month add number to date in sql adding days in sql server add days to date in sql server date ADD DAY IN SQL add date value to date sql add 2 hours to date in sql how to add days into date in mysql how to add days into date in sql sql insert datetime adding an hour sql date add hours add 2 days to date sql sql date minus today sql server date minus days add 1 day sql date t-sql add days how to add days in date in sql add days sql server mysql add days to curdate mysql select date add days add days function in sql how to add amount between date in sql how to add 5 days to current date in sql sql server add days to a date add-months sql mysql query date add days sql add hours and minutes to datetime sql add one hour to datetime sql server current datetime minus 1 day sql add 30 days to current date sql insert date sql add days to a date sql server add days to DATETIME add days in sql sql add dayto date sql add 2 hours to time mysql add date 1 day t sql current date minus 1 day mysql add days to today add days in date mysql sql date minus 1 month mysql add 2 days to date sql server add hours to datetime mysql, now add days sql current date minus 1 day mysql add days to column mysql adding days mysql how to add days to a date how to add days to a date column in sql set date time add 2 minutes sql add months in sql server dateadd add months in sql server DATE_ADD in my sql date add days dateadd month and day sql DATEADD() subtract 1 year date sql how to add dates column in sql sql datetime add seconds sql server getdate minus 1 day sql add 3 hours to date adding to datetime sql sql add 2 times sql server avg date year month day sql one month ago one week ago tutorial DATE_ADD parameters how to minus year from date in sql HOW TO GET CURRENT DATE AND SUBTRACT ONE YEAR IN TSQL sql add days to one month date + 6 days sql sql add days to date_add date add sql add 10 years to getdate in sql mysql add hour to datetime dateadd sql server day Add date and time SQL sql dateadd 6 months adding two dates in sql mysql day interval SQL datetime now plus a month add date to mysql html how to add days to a date sql sever date sum sql dateadd sql months sql add two months to date mssql dateadd dateadd between two hours sql dateadd() in mysql add days sql add months to date sql server mysql add date months how to add 1 day to date SQL mysql add 3 months to date date add seconds sql server dateadd() sql add 1 day sql sql add date sql sql server dateadd syntax sql add day to getdate add 5 hours andminutes to datetime in sql to datetime adding 10 years to sql mysql date functions add years to date inrease with one year in todays date sql add month to date SQL date minus in sql how to add one day in sql date_add() how to add one date in sql date_add() sql subtract a month from date 1616626800 timestamp 30days sql mysql add days to datetime sql add date and time incraese day mysql sqlserver date add tsql date - 1 day adddate functions in sql datepart month add 1 add one year to a date sql sql quary add date select date_add mysql phpmyadmin select date_add mysql add months to date mysql add days in date in mysql dateadd in sql hours sql add second to datetime add day to date mysql sql server date add sql add days to date add date in sql server date subtract sql HOW CAN WE ADD DATE IN SQL? sql remove 1 year from date sql server add date 1 day how to add 1 moth on sql what is dateadd in sql how to add date module in sql dateadd hours sql not work mysql date add 2 days dateadd in t-sql dateadd in sql MSSQL add date field add date sqlserver query add date mysql query mysql add 2 months to date dateadd sql c# form database dateadd sql year add days in sql server dateadd sql srever sql date now add month php mysql datatime interval date add sql serve"ur dadd days in date in Mysql dadd days in date in sql sql server date plus days add months to a date mysql sql getdate utc add hours sql date+1 dateadd(ss sql current date minus 1 year add hour to datetime column sql add date 1 week mysql sql change date add how to add hours in sql how to add one day to date in sql mysql add days to a date column mysql add days to a date add date to the current date sql how to add 1 year to date sql date + days sql increase date by one day in sql dateadd function to add minutes sql server date minus days sql add days to timestamp sql sql add days to timestamp print sql add days to timestamp sql dateadd years sql where date minus 1 year now() remove 1 year sql sql server add date sql ddate add dateadd w3schools add hours for given date in sql server sql add datetime ms sql add days to date mysql date add working days dateadd min sql add x number of days to date sql addmonths to date sql sql add no of days to date sql server dateadd function DATEADD sql mssql date = date +3 years tsql dateadd 1 day sql getdate minus 1 day math with sql server date mysql sum days to date sql subtract 1 year from date dateadd mysql function 1 year how to add 1 year in date mysql dateadd in mssql add dayes in date mysql subtract month sql mysql date - days sql add month to date sql server date math postgresql add days to date mysql date today add days add date in mysql minus one year from date in sql sql dateadd weeks mysql date_add minutes get now date with add Hours in sql sql server add day to date date add function add minutes to datetime mysql months in sql DATEADD by in sql mysql date add days add days to getdate sql ms sql add hours to datetime sql datetime add days how to add days to a date in sql sql dateadd year mysql datesun mysqld dateadd sql getutcdate add hours sql server add months to date how to add date from date mysql sql server query date to day 1 SQL DateAdd-1 Day add 7 days to date column in mysql add 30 days to getdate for 12 months in sql add 30 days to getdate in sql sql add date dateadd sql interval dateadd sql command date +1 day sql date add sql server sql select date plus time inserting day in sql table 3 days ago sql date add function in sql sql query to add date column mysql date add months add one date to todays date sql add minutes to date mysql add 30 minutes to datetime in sql server mysq add minutes sql year minus 1 add getdate sql mssql dateadd example sql++ datetime add_month in MySQL sql get current date minus n days add days in sqlserver add to date sql date_add sql 1 year 2 month add mi in sql mysql add 7 days to date mysql date add year sql for add days arithmetic of date in mysql add 7 days to date in mysql add day to date sql mssql add hours to datetime sql query date string minus 30 days t-sql increment date sql add time to date add 10 years to date sql sql add dates sql subtract 1 year from current datetime add_date in mysql add months to a datetime in sql server sql date add other than interval day interval mysql mysql 8 dateadd date add in sql server add 10 days to current date sql tsql date add 1 adding years to a date in sql mysql plus two days add hour mysql mysql date plus 7 days getdate add one minute sum dates in sql add week sql how to add date in mysql sql datetime add hours sql add one year of date 3 days back in sql server add days to a date sql how to sum dates in sql sql subtract days from current date dateadd day and one second date minutes sql date addition in sql plus onde day sql dateadd mssql Adding days to dates in sql server sql gate add day mysql dateadd in w3 select interval date mysql how to select current date in sql USING WITH DATEADD How to add 10 days to getdate in sql add date to sql funtion sql server subtract 1 year from date dateadd months adding days to a date in sql dateadd sql month how to get one year date from today date in sql server increment date in sql how to increment date in sql sql server get current time datetime plus 1 hour add date and time in sql query add date and time in sql sql date add format date math sql how to add date to current date in mysql how to add date to current date in sql how can add date in current date in sql how can add date in sql add ss to a date in sql server sql reduce datetime by 3 months mysql enhance date month by 10 days sql date today plus 7 days datetime add date for hour sql add date interval mysql add date month sql sql add 1 year 1 month 7 days to date mysql adddays mysql datetime add sql next year sql add year to date mysql add day datetime sql get date + date add dateadd minutes sql server add date and time increase date by one day mysql add one year to date in sql sql add years to date mysql add minutes sql change date + 1 year dateadd on sql mysql add day to date field dateadd function in sql sql server dateadd year sql date now plus 7 days add month to date in Mysql how to add a day in sql server add a number to a date time in mysql add a number to a date in mysql sql server insert month from date into new column sql date plus one day add days to current date in mysql add 3 days to current date in mysql add 3 days to current date in sql mysql add days to date column mysql add days to timestamp sum days to date mysql sql server subtract 5 years from date mysql sum days to current date mysql interval dateadd interval sql add days to date sql server datetime add year sql add year to datetime sql sql change datetime add year sql command to add date sql command to add datae mysql date add interval day add minutes to date in mysql t-sql getdate() add month t-sql getdate add month mysql add to datetime how to sum and subtract date in sql add one day in mysql add dates sql get date a year back from current date in sql mysql add 6 day to current date and store it not add date in mysql not add date in sql mysql add days to current date mysql date add 1 month add date fieldin mysql how to add hour in sql server how to add dates in sql date - days in sql sql server date variable year part add year sql add a month to today dateadd in sql add 10 min add 6 days to date sql add date in date in sql server how to insert hour to sql how to insert hour to sq; sql add days to current date how to add date value in sql add 14 days from today with out saturday and sunday in sql mysql add date with column mysql select add months to date mysql add months to date sql add to year add years to date sql add one day in date sql server add one date in given date sql server selelct time plus 1 sql date interval mysql date_add can't access to function sql how to add days on a date my sql select date interval mysql add one day to date in sql query mssql add years at date adding one day to date in sql DATE_ADD SECONDS adding new date in getdate sql server get date to add specific date add specific date in getdate sql server DATE_ADD(NOW(), INTERVAL 1 DAY) time add in sql query time add in sql server how to increment year in sql mysql dateadd example adddate sql format DATE_ADD(@_ClassDate, INTERVAL DayID-1 DAY) mysql how to add dates in sql query sql function dateadd date add months SQL MYSQL add minutes on time adding ND on dates sql Add 60 day Sql date plus 1 day mysql date interval in mysql query date interval in mysql sql dataadd how to add month in date in sql add time to date in sql query how to add a day to datetime in sql server add hours in time sql server function dateadd sql server mssql how to add 1 day to date Date add sql server function DATE_ADD(expire_timestamp, INTERVAL 2 MINUTE)",TIME); DATE_ADD(cexpire_timestamp, INTERVAL 1 HOUR) date_add in mysql sql add year dateadd one month mysql date plus 1 day mysql datetime add hours sql add 5 hours to datetime sql date plus 1 year in inner join query sql date plus 1 year adding days to date in sql server mssql add 3 hours to datetime mysql add 3 hours to datetime add minutes sql server date add 10 years sql subtract month from date in sql sqlserver dateadd sql getdate() add days how to get next date in sql query add months in mysql sql sum day to date sql where date < sum date+day mysql add day to date DATE_ADD(LastUpdateDate, INTERVAL 5 MINUTE) >= NOW() in sql server timeadd() sql adddate sql add 1 day to datetime mysql added function on sql sql server add days to current date mysql add one day how to add 45 days to a date in sql how to add days to current date in sql time is being added to date mysql sql server dateadd hours t sql remove one month to date mysql add 1 month to date select mysql add 1 month to date sql where date is + 1 mont SQL DATE_ADD sql server select add 10 addition of dates mysql sql date add month sqlserver date - 18 months sqlserver day add dateadd() sql current datetime 1 hour add in sql server sql dateadd last few days in a month sql dateadd laster few days in a month add_days mysql sql to add date months sql server sql from days function add dates mysql adding up months to a date in sql sql add 1 year to date mssql date + 1 year add date in sql mysql add 365 days to DateTime.Now mysql date + 1 how to add one day in current date in sql server how to add one day in date in sql server add dates in MYSQL add dates in sql dateadd mysql adding date in mysql sql server time add sql add date with months add month in sql sql server datetime add days mysql add date sql cast datetime to add hour add 3 weeks to existing date in sql sql day + 2 sql datetime now + day mysql date plus 3 days DATEADD in mysql mysql add 1 day to date add date mysql increse year query php sql dateadd for minutes sql server date subtract 1 year add tsql 1 day tsql add hours to datetime how to add date in sql server table date add in mysql sql add 2 hours to datetime add 1 to date in sql GETDATE AND ADD DAYS SQL SQL calculate date past SQL calculate date add one month to date mysql sql add hour to datetime sql Add year to date sql getutcdate add days subtract a year from a date in sql add a year to a date in sql dateadd add 3 days dateadd example tsql date add sum date mysql sql date plus 1 day how to add values to date in mysql dateadded = later date added in sql server date - 1 in sql query SQL SERVER DATEADD 1 DAY mysql add days add 1 dat in datetime in sql server sql add days to date mysql sum 1 day in date in sql server add subtract date in sql mysql date interval add time to existing date using DATEADD in sql add time to getdate function interval SQL add time in date in sql sql adddate sql server get date plus 1 year add 1 hour to mysql now How add hours iin datetime in mysql mysql date add substract year from date sql date_add sql add years to getdate in sql server sql date add 1 day date_add() in mysql add days to date mysql add 1 day to date sql add a month to date mysql date and time add in sql date add in sql mysql now + add day 7 hour add day to mysql date js date + interval 5 years in mysql sql select from date add +1 hour php select date from sql and add 1 hour add days date in sql server sql add one day to date sql get date plus 1 year date add method in sql dateadd seconds sql sqlserver add days add one day in date sql how to add one in date in sql sql add date calculations in query date add mysql add minutes to date in sql sql getdate minus 1 year sql server date format add year sql server date format add days add minutes in sql mysql next interval date by year date_add in sql msql add week today add month to current date sql How to get less then 3 days date using sql date_add in mysql with examples year +1 sql add 7 days to a date varibale in mysql sql server DATE SUB one hour in select sql server DATE SUB in select sql date add day tsql date dateadd tsql date add a month sql stateents adding months mysql date add days from column tsql increase date by one day tsql increase date how to add to a date in mysql add a month to date in sql add integer to date in sql NOW sql add 3 hours mysql dateadd mysql add days to date date_add mysql getdate sql minus days MYSQL DATE_ADD mysql add time how to add 1 day to date in sql server sql getdate add days add minute to a date in sql server add hour to a date in sql server sql server add 1 day to date t-sql add 11 hrs to date t sql dateadd sql where date_add sql add hours to datetime add 1 day to a date sql sql query date +1 Add 1 minute to datetime sql how to add 30 days in current date in sql HOW TO ADD 1 DAY ON DATE SQL QUERY ADD TIME TO DATEADD SQL add date to sql how to add years to date in sql date add function in sql server add day to date in sql adding two date in sql adding date in sql add month in sql server add 5.30 hs in sql tsql add years add to date in sql server sql adding date sql dateadd function add months to date in sql add day in date in sql sql dateadd add 1 day dateadd parameters in sql sql server add months sql server add mmonths transact sql dateadd sql date add sql sql add 1 day to date add one month in sql sqlserver date now remove 1 year how to add two dates in sql dateadd month mssql date add format sql sql add day dateadd with example sql date + 1 dateadd in sql server sql server plus hour from datetime sql add time to date field add minutes to date sql server sql add day to date add month to date in sql sql GETDate() add month uppend date month and year in sql SQL Date subtract months sqlserver date add days add a new date in sql sql add 1 week to date get next 8 hours sql sql add two datetimes add days to date sql server how to add date in sql t-sql add one day to date mssql date add days sql server date_add interval dateadd ms sql sql server dateadd update hours with dateadd sql add 1 year for date in sql sql server get current date plus 1 day sql server add days mssql dateadd minutes sql add days current date minus 1 year in sql sql dateadd dateadd in sql year sql server add one year to date sql add days to date DATEADD (Transact-SQL) sql transact dateadd mssql addays display date two days before SQL get time now sql add day t-sql dateadd SQL server days add sql server add 24 hours to date add execute date in sql sql server getdate add days dateadd sql server sql add minutes to datetime add date sql adding 30 days to sql date add 3 months to now() in sql sql server add 18 hours to datetime adding dates in sql sql date subtract sql date add subtract months fromm date sql mssql add 1 day to date tsql dateadd DATEADD(DD) how to implete dateadd in sql server sql add date column sql date add days date add year and month in swl dateadd months sql server DATEADD - MONTH DATEADD Month get date plus 1 day sql how to calculate date in sql mssql add 30 days to date sql add a day to date sql server add years to date add days to date in sql tsql adddays date_add in sql server add 6 months to a date in sql sql adding dates date plus 2 days sql how to add 2 hours to datetime in sql server t sql date plus 1 day tsql add days to date add months to date sql add days to date sql sql query how to add date sql add months to date mssql get date adddays dateadd sql dateadd month timeadd sql date add mssql dateadd date format sql server current date minus 5 years how do i add a date in sql sql add 2 hours to date add datetime sql addhours datetime sql server SQL SERVER adjust date sql server today minus n t-sql add months minus one day add hours to date in sql server datetime add 2 hours sql
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source