Hi PHP warriers, Can u just help in a time and date functionality in PHP. I wanna insert just the hour and minute in a PHP page and Update it in MySQL database as Time field. Thanks West
Hi westlifee21 Welcome to DP this could be a good place to start http://www.adesdesign.net/php/tutorials/php/date_in_php.php
Thanks Uglyboy that was a great site. But i Have to insert just the hour and minute to the time field in mysql database. How i can do that?? cos if i need to do some time calculation at a later time it should not create problems. Can u help me on this regard???
Im not sure that you could only insert hour and minute and have it work for you.. Even though i dont really know what it is you want to do... I believe you would have insert year, month, day, hour, minute, second. to be able to do any calculations .. Then you display whatever parts you require..
just insert the actual time and then when you reference it outside of mysql (select the data for output) just grab the hour and minutes. select date_format(my_date,'%h:%m') as hour_min from tbl1 Code (markup):