| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Pintér Tibor | Date: | February 24 2011 5:09pm |
| Subject: | Re: Get date from unix_timestamp only up to the hour | ||
| View as plain text | |||
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
| Thread | ||
|---|---|---|
| • Get date from unix_timestamp only up to the hour | Bryan Cantwell | 24 Feb |
| • Re: Get date from unix_timestamp only up to the hour | Nathan Sullivan | 24 Feb |
| • Re: Get date from unix_timestamp only up to the hour | Bryan Cantwell | 24 Feb |
| • Re: Get date from unix_timestamp only up to the hour | Pintér Tibor | 24 Feb |
| • Re: Get date from unix_timestamp only up to the hour | Michael Dykman | 24 Feb |
| • Re: Get date from unix_timestamp only up to the hour | Pintér Tibor | 24 Feb |
