Your Open Source
Free YourOpenSource Softwares Online Resources and Softwares Downloads with Demo
Related Posts
How to convert date to timestamp
mktime() function used to convert the date to timestamp in PHP.
The syntax is :
------------------
mktime(int hour, int min, int sec, int mon, int day, int year) ;
423
Jul 01 08 11:27:44
Sekar
| mktime() |
The getTimeStamp(string date ) to convert the date to timestamp. And also convertTime2Date(string timestamp ) function used to convert time to standard date. The code as follows : |
<?php
function getTimeStamp($dat){ $dat = explode("-",$dat); return mktime(0,0,0,$dat[1],$dat[0],$dat[2]); } function convertTime2Date($time){ return date("d-m-Y",$time); } ?> |
|
Rating :
![]() ![]() ![]() ![]() ![]() | Tags :- PHP |
|
|||||||
Digg
Yahoo
delicious
