TecTao Posted May 5, 2009 Share Posted May 5, 2009 I have a field in a DB which inserts a simple date when a member signs up. the inserted date in the field is Y-M-D (2009-04-15). I've got the function to calculate a date 30 days from todays date. What I need and can't get figured out is: Create a Date Variable 30 days from a signup date. Example: the date in the DB is 2009-04-15 and I need to create a variable that is 30 days or 2009-05-15. The next step is to calculate the remaining days from the signup date and todays date if it's less then 30 days. From this info I'll be using if/else statements to determine if a member needs to process a payment. Thanks for help and suggestions in advance. Link to comment https://forums.phpfreaks.com/topic/156936-solved-need-variable-for-signup-date-30-days-and-remaining-days-from-signup-date/ Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 Can't you have the MySQL take care of that? It can do date math. Link to comment https://forums.phpfreaks.com/topic/156936-solved-need-variable-for-signup-date-30-days-and-remaining-days-from-signup-date/#findComment-826697 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.