time validation

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
lucashii
Forum Newbie
Posts: 1
Joined: Fri Apr 14, 2006 6:56 am

time validation

Post by lucashii »

I want to validate the current time with the time store in my db which is $timea.I currently got the code to work but i wish to change the format to 24 hr time format.Is that possible?any help would be appreciated~~thanks~~

$oldTime = strtotime("today $timea");
$nowTime = mktime();
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The time is in seconds from the epoch. You can run it through date() to find out the time in almost any format you wish.
Post Reply