From: Pintér Tibor Date: February 24 2011 5:09pm Subject: Re: Get date from unix_timestamp only up to the hour List-Archive: http://lists.mysql.com/mysql/224501 Message-Id: <4D6690B9.30008@tibyke.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 02/24/2011 05:56 PM, Nathan Sullivan wrote: > Bryan, > > Maybe something like this would work? > > select 1296158500 - (1296158500 % 3600) ah, yes, even this one: mysql> select now() - interval (unix_timestamp() % 3600) second; +---------------------------------------------------+ | now() - interval (unix_timestamp() % 3600) second | +---------------------------------------------------+ | 2011-02-24 18:00:00 | +---------------------------------------------------+ 1 row in set (0.00 sec) t