Question: how to convert string value from textbox to date format in php?
Answer: First you use strtotime to convert your string to a unix timestamp, like so: $time = strtotime( $date ); Then you use this timestamp to calculate a date in whatever format you want. To get the format yy-mm-dd, you need the following formula string: 'y-m-d'.