Time Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gotornot
Forum Commoner
Posts: 54
Joined: Fri Jul 31, 2009 2:30 am

Time Question

Post by gotornot »

Hi

Im looking to generte a unix tmestamp for a certain day so i can use it to compare in db the info is posted through ie day=, month=, year=,

Is there a comand i could use for example

$fromunix = comand(''00:00:01','$day','$month','$year') i need 1 second past midnight and the date to compare it to will be:
$tounix = comand(''23:59:59','$day','$month','$year')

Any ideas?
User avatar
SimpleManWeb
Forum Commoner
Posts: 57
Joined: Wed Dec 30, 2009 4:15 pm
Location: New Hampshire, USA

Re: Time Question

Post by SimpleManWeb »

I believe you will need "mktime". Take a look at the examples here:

http://php.net/manual/en/function.mktime.php
Post Reply