CodeIgniter Forums
need with date input? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: need with date input? (/thread-12454.html)

Pages: 1 2


need with date input? - El Forum - 10-23-2008

[eluser]newbie boy[/eluser]
I got the solution:

in the model controller this must go:

Code:
$calendar = $data['day']."/".$data['month']."/".$data['year'];
      $date = explode("/",$calendar);
            
     $this->birthday    = date("Y/m/d",mktime(0,0,0,$date[1],$date[0],$date[2]));

hope this can help you too.