Mysql Date Input

Mysql Date Input is used to give the input date and convert the input into the required format.

Mysql Date Input

Mysql Date Input

     

Mysql Date Input is used to give the input date and convert the input into the required format.

Understand with Example

The Tutorial helps you to understand an example from 'Mysql Date Input'. To understand and grasp this example we use PHP tag that include the input date '3-Jan-2008' and further convert the input date into the required format date("Y-m-d|").

 

 

In this example give input the date and convert into the required format.

<?
$input = "3-Jan-2008";
$date = date("Y-m-d",strtotime($input));
?>
The input : <? echo $input; ?><br>
The output : <? echo $date; ?>

 Output :

The input : 3-Jan-2008
The output : 2008-01-03