Joerg: thank you. That worked and much faster too.
WHERE EVENT_DATA.utime >
UNIX_TIMESTAMP(SUBDATE(CURDATE(), 5)) AND
EVENT_DATA.utime < UNIX_TIMESTAMP(SUBDATE(CURDATE(),
4))
Ravi
--- Joerg Bruehe <[EMAIL PROTECTED]> wrote:
> Hi Ravi, all,
>
>
> Ravi Malghan wrote:
> > Joerg: are you saying I
--- Ravi Malghan <[EMAIL PROTECTED]> wrote:
> Joerg: are you saying I need to compute the start time
> and end time in epoch values and use it in
> select count(*) from EVENT_DATA
> where utime > start_time and utime < end_time ?
>
> Can you provide some pointers and what to search on. I
> h
Hi Ravi, all,
Ravi Malghan wrote:
Joerg: are you saying I need to compute the start time
and end time in epoch values and use it in
select count(*) from EVENT_DATA
where utime > start_time and utime < end_time ?
"need to"?
This is not required in order for the command to work (at all),
b
Joerg: are you saying I need to compute the start time
and end time in epoch values and use it in
select count(*) from EVENT_DATA
where utime > start_time and utime < end_time ?
Can you provide some pointers and what to search on. I
have searched and can't seem to find any leads on how
to get t
Hi Ravi, all!
Ravi Malghan wrote:
Ok. I found something. But wondering if this is most
efficient
Events for yesterday:
select count(*) from EVENT_DATA where
FROM_UNIXTIME(utime,'%Y-%m-%d') = (CURDATE() -
INTERVAL 1 DAY);
Events for last week
select count(*) from EVENT_DATA where
FROM_UNIXTIME(
Ok. I found something. But wondering if this is most
efficient
Events for yesterday:
select count(*) from EVENT_DATA where
FROM_UNIXTIME(utime,'%Y-%m-%d') = (CURDATE() -
INTERVAL 1 DAY);
Events for last week
select count(*) from EVENT_DATA where
FROM_UNIXTIME(utime,'%U') =
(DATE_FORMAT(CURDATE(),'
Hi: I have a date/time field (utime) which has unix
time in epoch time. I want to select events from
yesterday and another statement for all events from
previous week.
I have tried the functions listed at
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html.
But I either get a synta