jmurch Posted May 7, 2009 Share Posted May 7, 2009 I have a date in the format '06-AUG-99'. I need to display a date 90 days in the future and 13 months in the future. The date is coming from a text field in an RMS database (pre-relational) so I would guess that the characters need to be converted to a date format that PHP will like. TIA, Jeff Quote Link to comment Share on other sites More sharing options...
premiso Posted May 7, 2009 Share Posted May 7, 2009 strtotime would be the function to look into. You may have to convert that date into a different format however using explode or a similar method to re-construct into a format that strtotime will take. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 7, 2009 Share Posted May 7, 2009 $date = '06-AUG-99'; echo date('m-d-Y', strtotime($date . ' + 90 DAYS')); // 90 days in the future echo date('m-d-Y', strtotime($date . ' + 13 MONTHS')); // 13 months in the future Quote Link to comment 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.