0

Im using this code at the moment:

Deadline: <input type="date" name="deadline" value="<?=$datetime?>">

When i echo $datetime it gives: 2015-03-07, but when the script runs the value of the input is 07-03-2015, with other words the data type picks my country use of it, that is dd-mm-yyyy but i want yyyy-mm-dd someone nows how to do this?

Thanks in advance!

Chiel
  • 83
  • 10

1 Answers1

0

Use the date function with the desired format and order. You can find out all of the inputs here: http://www.w3schools.com/php/php_date.asp

ex.

echo date("Y/m/d");