Creating a Timestamp with mktime() : mktime « Date « PHP

Creating a Timestamp with mktime()

<title>Creating a Timestamp with mktime()</title>
$ts = mktime( 2, 30, 0, 5, 1, 2004 );
print date("m/d/y G.i:s", $ts);

print "<br/>";
print "The date is ";
print date("jS of F Y, \a\\t g.i a", $ts );


Related examples in the same category

1.Calculating the difference between two dates
2.Checking credit card expiration
3.Use mktime to create a time
4.Using mktime() and date() mktime ( [int hour [, int minute [, int second [, int month[, int day [, int year [, int is_dst]]]]]]] )
6.mktime() produces a GMT timestamp.
8.Making an epoch timestamp
9.Get the labor day