Comment ajouter un mois dans la mise à jour SQL
UPDATE users
SET date = DATEADD(MONTH, 1, date)
Fine Frog
UPDATE users
SET date = DATEADD(MONTH, 1, 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(month, 1, '2017/08/25')
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'
UPDATE users
SET date = ADD_MONTHS(date, 1)
UPDATE users
SET date = DATE_ADD(date, INTERVAL 1 month )