CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
PHP Problems
mysql/php - date and time
XaviJr
Permalink to comment
#
June 2012
Hi!
I have two different fields, date and time, saved in MySQL database and I need to compare those two together with the current time in PHP.
I googled but I can only find examples with datetime or timestamp, nothing with "date" and "time" types.
Can you help me please?
traq
Permalink to comment
#
June 2012
are your
date
and
time
fields
DATE
and
TIME
types, respectively?
Also, what do you mean by "current time"? Is your script (_and_ database, _and_ client) using UTC?
Add a Comment
I have two different fields, date and time, saved in MySQL database and I need to compare those two together with the current time in PHP.
I googled but I can only find examples with datetime or timestamp, nothing with "date" and "time" types.
Can you help me please?
dateandtimefieldsDATEandTIMEtypes, respectively?Also, what do you mean by "current time"? Is your script (_and_ database, _and_ client) using UTC?