Welcome Guest, Not a member yet? Register   Sign In
How to add 7 days to mysql date?
#6

[eluser]Sumon[/eluser]
Yes it's valid mysql query statement.I am using mysql version:5.0.45 Here it is once again with full explanation
Code:
UPDATE EVENTS SET EventDate = DATE_ADD( EventDate, INTERVAL 14 DAY ) WHERE EventId =1;
and here is the database table:
Code:
CREATE TABLE `events` (
  `EventId` int(11) NOT NULL auto_increment,
  `EventDate` date NOT NULL default '0000-00-00',
  `EventTitle` varchar(250) NOT NULL default '',
  `EventVanue` varchar(250) NOT NULL default '',
  `EventDetail` longtext NOT NULL,
  PRIMARY KEY  (`EventId`)
);
-- Dumping data for table `events`
INSERT INTO `events` (`EventId`, `EventDate`, `EventTitle`, `EventVanue`, `EventDetail`) VALUES
(1, '2006-03-14', 'This Class is Created By Aminul', '[email protected]', 'Conatct Info:\nMd. Aminul Islam\nHouse- 310/B\nSoudi Coloni\nDhaka Cantonment\nBangladesh\nMobile- 880189512733'),

I hope this might helpful for you.


Messages In This Thread
How to add 7 days to mysql date? - by El Forum - 06-25-2008, 11:05 PM
How to add 7 days to mysql date? - by El Forum - 06-25-2008, 11:24 PM
How to add 7 days to mysql date? - by El Forum - 06-25-2008, 11:47 PM
How to add 7 days to mysql date? - by El Forum - 06-25-2008, 11:53 PM
How to add 7 days to mysql date? - by El Forum - 06-26-2008, 05:41 AM
How to add 7 days to mysql date? - by El Forum - 06-26-2008, 06:06 AM
How to add 7 days to mysql date? - by El Forum - 06-26-2008, 09:12 AM
How to add 7 days to mysql date? - by El Forum - 06-27-2008, 12:42 AM
How to add 7 days to mysql date? - by El Forum - 08-21-2008, 08:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB