Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello i'm having a textbox [datetimepicker].
when we select it will show like a format dd/mm/yyyy hh:mm
eg: 24/04/2014 11:00
now i need to store this value to mysql table using php.
i'm having an attribute appointment which is in type 'datetime'
i tried but i did not solved.
i used the following code but it will not solved my problem
PHP
$papp=$_POST['papp'];
    $papp = date("Y-m-d h:i:s",  strtotime($papp));

it give a result like 1970-01-01 05:30:00

kindly solve my pblm..
thanks in advance
Posted

1 solution

i solved this
small mistake in dat code.. i changed the format then it was worked fine..
no pblm nw
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900