Re: Date functions

2006-07-07 Thread Chris W
Addison, Mark wrote: From: Chris W Sent: 07 July 2006 09:23 It's late and I just gave up reading the manual. Can someone please tell me the easiest way to do a query that will return all rows with a time stamp that is X number of seconds older than the current time? Something like this

Re: Date functions

2006-07-07 Thread Brent Baisley
The INTERVAL command is what you are looking for. It doesn't have to be SECOND (with no S), you could use day, hour ,week, etc. SELECT * FROM t WHERE TimeCol<(now() - INTERVAL X SECOND) http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html - Original Message - From: "Chr

Re: Date functions

2006-07-07 Thread Dan Buettner
Try this: SELECT * FROM t where TimeCol < date_sub( now(), INTERVAL x SECOND ) Dan On 7/7/06, Chris W <[EMAIL PROTECTED]> wrote: It's late and I just gave up reading the manual. Can someone please tell me the easiest way to do a query that will return all rows with a time stamp that is X num

RE: Date functions

2006-07-07 Thread Addison, Mark
From: Chris W Sent: 07 July 2006 09:23 > > It's late and I just gave up reading the manual. Can someone please > tell me the easiest way to do a query that will return all > rows with a > time stamp that is X number of seconds older than the current time? > Something like this. > > SEL

Re: Date Functions in MySQL

2005-02-23 Thread Clarence
Shoot me now, please. Thanks - I don't know how I missed that! Thanks - re-ran the query and things seem to be a-ok! On Wed, 23 Feb 2005 18:42:17 +0100, Roger Baklund <[EMAIL PROTECTED]> wrote: > Clarence wrote: > > I have a log table that records certain transactions on one of my sites. > > I'm

Re: Date Functions in MySQL

2005-02-23 Thread Roger Baklund
Clarence wrote: I have a log table that records certain transactions on one of my sites. I'm using a timestamp field to mark the date/time of each transaction. I'm trying to run a query that will display the transactions by date using the following SQL: SELECT COUNT(log_id) AS total, WEEK(FROM_UN

Re: date functions

2003-02-16 Thread Paul DuBois
At 17:24 -0500 2/16/03, Melih Onvural wrote: Hi all i'm new to the SQL programming language and i was trying to play with a date/time counter of sorts. I was trying to teach myself the various date functions, but I feel like I've failed. I had a database with birthdates in it, and I subtracted

Re: date functions

2003-02-16 Thread Stefan Hinz
Melih, > Year(Date - BirthDate) - 1900 What you're looking for is in the manual. Check it out: http://www.mysql.com/doc/en/Date_calculations.html Have fun! :) Regards, -- Stefan Hinz <[EMAIL PROTECTED]> iConnect GmbH Heesestr. 6, 12169 Berlin (Germany) Telefon: +49

Re: date functions

2003-02-16 Thread Jerry
I know this is a MySQL list but Personally being a php coder, I'd do it in php. http://www.mysql.com/doc/en/Date_and_time_functions.html - Jerry @ MetalCat.Net - - Original Message - From: "Melih Onvural" <[EMAIL PROTECTED]> To: <[EMAIL PROTE

RE: Date functions returning Strings

2001-09-05 Thread Venu
Hi !!! )-Original Message- )From: Ghislain Gadbois [mailto:[EMAIL PROTECTED]] )Sent: Wednesday, September 05, 2001 7:37 AM )To: MySQL List (E-mail) )Subject: Date functions returning Strings ) ) )Hi, ) )I'm using MM JDBC driver version 2.0.4 to access a MySQL database )3.23.40 on Sola

Re: date functions crash

2001-04-05 Thread Sasha Pachev
On Wednesday 04 April 2001 04:03, Max Hammond wrote: > I'll just add that if anyone wants a dump of the data causing this, drop > me a note at [EMAIL PROTECTED] and I'll mail it to you, it's about 2500 > rows, and only that one field necessary to crash it. > > Cheers, > > Max Fix: --- 1.11/sql

Re: date functions in GROUP BY?

2001-02-19 Thread Fred van Engen
On Mon, Feb 19, 2001 at 11:06:21AM -0800, [EMAIL PROTECTED] wrote: > I have a table with a date field, and would like to sort it > on month and day. What I would like to do is: > > > SELECT lastname,firstname,dob FROM table1 GROUP BY month(dob),day(dob) > > (where dob is a column of type 'da