List:General Discussion« Previous MessageNext Message »
From:Bryan Cantwell Date:February 24 2011 5:07pm
Subject:Re: Get date from unix_timestamp only up to the hour
View as plain text  
Yes perfect! Thanks, I knew I was over thinking this.

On 02/24/2011 10:56 AM, Nathan Sullivan wrote:
> Bryan,
>
> Maybe something like this would work?
>
> select 1296158500 - (1296158500 % 3600)
>
>
> Hope that helps,
>
> Nathan
>
> On Thu, Feb 24, 2011 at 08:41:58AM -0800, Bryan Cantwell wrote:
>> How would I go about modifying a unix timestamp to actually represent
>> the 'top of the hour' that it represents?
>> For instance:
>> 1296158500 = 1/27/2011 2:01:40 PM
>> That is in the 2:00 pm hour, how can I find that out and modify it to
>> 1296158400 which = 1/27/2011 2:00:00 PM?
>>
>>
>>
>>
>> -- 
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>>

Thread
Get date from unix_timestamp only up to the hourBryan Cantwell24 Feb
  • Re: Get date from unix_timestamp only up to the hourNathan Sullivan24 Feb
    • Re: Get date from unix_timestamp only up to the hourBryan Cantwell24 Feb
    • Re: Get date from unix_timestamp only up to the hourPintér Tibor24 Feb
  • Re: Get date from unix_timestamp only up to the hourMichael Dykman24 Feb
  • Re: Get date from unix_timestamp only up to the hourPintér Tibor24 Feb