1// 1. create a date instance
2$date = new DateTime;
3
4// 2. set the date using the setDate(year, month, date) method on the
5// $date instance
6$date->setDate(1999,02,19);
1$date_input = '2003';
2$date_output= date( "Y-m-d", mktime( 0, 0, 0, 1, 1, $date_input ));
3//date_output = 2003-01-01
1<input type="datetime-local" name="followupon" value=<?php echo date('Y-m-d\TH:i:s'); ?>">
2