izbryte Posted January 7, 2008 Share Posted January 7, 2008 Hi! I have a database with a date field (datetime). I'd like to add 60 days to every row in that field. Is there an easy way to do this in phpMyAdmin? Link to comment https://forums.phpfreaks.com/topic/84920-solved-easy-way-to-add-60-days-to-datetime-in-mysql-to-all-rows/ Share on other sites More sharing options...
Ken2k7 Posted January 7, 2008 Share Posted January 7, 2008 How is the date field being stored? By that, I mean what format is it? A number? String? Link to comment https://forums.phpfreaks.com/topic/84920-solved-easy-way-to-add-60-days-to-datetime-in-mysql-to-all-rows/#findComment-432966 Share on other sites More sharing options...
GingerRobot Posted January 7, 2008 Share Posted January 7, 2008 Try: UPDATE tbl SET col = col + INTERVAL 60 DAY Link to comment https://forums.phpfreaks.com/topic/84920-solved-easy-way-to-add-60-days-to-datetime-in-mysql-to-all-rows/#findComment-432968 Share on other sites More sharing options...
izbryte Posted January 7, 2008 Author Share Posted January 7, 2008 perfect! thanks! Link to comment https://forums.phpfreaks.com/topic/84920-solved-easy-way-to-add-60-days-to-datetime-in-mysql-to-all-rows/#findComment-432971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.