Match datetime by the minute (not an exact match by the second) [mysql]
I have the following query:
Code:
$sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)"; Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)? Thanks & regards |
Quote:
Code:
DATE_FORMAT( table1.datetime, '%Y-%m-%d %H:%i' ) = DATE_FORMAT( table2.datetime, '%Y-%m-%d %H:%i' )) |
All times are GMT -5. The time now is 03:46 PM. |