How to get time and Date from datetime stamp in php and mysql?
You can use the strtotime php function to separate date and time from datetime string. It can come in handy when you need to separate date and time from datetime format in the mysql database.
$datetime = '2013-08-14 11:45:45'; echo date("Y-m-d",strtotime($datetime)); // output 2013-08-14 echo date("H:i:s",strtotime($datetime)); // output 11:45:45Small and simple solution. :)
nice thanks man
ReplyDeletehello mam ager ham ne db se date echo karwaye use hm y-m-d me frmet me kese chanj kare ge
ReplyDelete