ivytony Posted March 10, 2008 Share Posted March 10, 2008 What I want to do is to add a warranty expiration date for the products my customers bought. Say the transaction date is stored in unix format. When I update each order, I'd also like to add an expiration date to the database order table. I am wondering if I can do some basic calculation in SQL. Say, the order date is: 1203557592 (unix time) and the expiration date will be 60 days after this: 60 * 24 * 3600 seconds. thanks! Link to comment https://forums.phpfreaks.com/topic/95297-how-to-do-calculation-in-sql-and-save-the-new-value/ Share on other sites More sharing options...
beebum Posted March 10, 2008 Share Posted March 10, 2008 UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL + 60 DAY)) Link to comment https://forums.phpfreaks.com/topic/95297-how-to-do-calculation-in-sql-and-save-the-new-value/#findComment-488449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.