CloudSex13 Posted April 1, 2009 Share Posted April 1, 2009 Hi all, thanks for reading this. I have a baffling question (at least to me) that I'm hoping to receive even the slightest bit of help for... If I have a date in the format of, for example: 1/4/2009 ...where 1 is the day, 4 is the month, and then there's the year, is there a way during the form submission process that I can manipulate that data to: 2009-04-01 ...which is the PHP date format standard? Crazy, right? Thanks if so. Link to comment https://forums.phpfreaks.com/topic/152127-manipulating-data-in-a-form-submission/ Share on other sites More sharing options...
fanfavorite Posted April 1, 2009 Share Posted April 1, 2009 I assume you are asked after the form has been submitted. You can try something like: $newdate = date ('Y-m-d',strtotime($_POST['formdate'])); There are many ways to work with date. Link to comment https://forums.phpfreaks.com/topic/152127-manipulating-data-in-a-form-submission/#findComment-798962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.