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() -
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
On 02/24/2011 05:41 PM, 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
If the timestmp is in seconds, the result is simply mod(timestamp,3600)
- michael dykman
On Thu, Feb 24, 2011 at 11:41 AM, 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
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?
> F
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 Mai
saraswathy,
Thursday, April 11, 2002, 12:41:29 PM, you wrote:
ss> I want to get date expire according to their term joining...let say 6 month
ss> term..so i have to get the date when reach 6 month can anyone help me...
Take a look at MySQL date and time function, such as DATE_ADD(),
DA
hi everybody,
I want to get date expire according to their term joining...let say 6 month
term..so i have to get the date when reach 6 month can anyone help me...
query
sql
thanks in advance.
_
Join the worlds largest e-mail
Hello all,
I'm not quite sure how to work this out. I have two columns in a table that
hold a week number (i.e. 1, 9, 52, etc.) and a year value (i.e. 2000, 2001,
etc.). I need to get a date value for the first day of each week and it's
associated year. For example, given week 8 in the year 2001,