[MySQL] Equivalent to MSSQL?[RESOLVED]
Hey in MSSQL when i want to check a column to see if its older than five minutes i do
Code:
DATEDIFF(minute,time_column,GETDATE()) <= 5
Is there an an equivalent in MySQL? or do i have to create the date in PHP and compare that value to the one in my DB?
Thanks
Re: [MySQL] Equivalent to MSSQL?
No, DATEDIFF will return days.
I think you would need to use TIMEDIFF, SUBDATE or DATE_SUB to subtract and find the difference.
Re: [MySQL] Equivalent to MSSQL?
Re: [MySQL] Equivalent to MSSQL?
Cheers, was searching for the wrong thing :rolleyes: