how to use now() in a where clause mysql

how to use now() in a where clause mysql

I had a table which had a timestamp on it, and i only wanted to return records that were timestamped today, however it was date and time stamped so needed to find a way to shorten the now() and my timestamp column

This is what i came up with:

select timestamp from table where left(timestamp,10)=left(now(),10);

Worked a treat



Turbo Charge your business

We put our money where our mouth is. Our mission is to help any business anywhere get back on track.

If we don't bring you new customers you pay us nothing. We take nothing up front and there is no contract. We trust you implicitly. And it is literally if you don't pay us for bringing in new customers, then we stop brining them in.

You decide how much you are willing to pay for a customer and you pay once we bring them to you.

Simple, easy nothing else to explain.

If you would like us to help you get your business or products booming email us at

Speak soon.