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? Quote 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? Quote 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 Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.