date query

2007-08-14 Thread Christian High
I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or may not be taken everyday. I need to develop a query that will subtract the scale reading on one day from the scale reading on the next

Re: date query

2007-08-14 Thread Baron Schwartz
Hi, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or may not be taken everyday. I need to develop a query that will subtract the scale reading on one day from the

Re: date query

2007-08-14 Thread Christian High
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or may not be taken everyday. I need to develop

Re: date query

2007-08-14 Thread Jason Pruim
On Aug 14, 2007, at 8:38 AM, Christian High wrote: On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or

Re: date query

2007-08-14 Thread Baron Schwartz
Hi, Christian High wrote: On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or may not be taken everyday. I

Re: date query

2007-08-14 Thread Christian High
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, Christian High wrote: On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150

Re: date query

2007-08-14 Thread Shawn Green
Hi Christian, Christian High wrote: I have a table that includes a date and a scale reading like datescale_reading 2007-08-01 150 2007-08-02 125 these reading may or may not be taken everyday. I need to develop a query that will subtract the scale reading on one

RE: Help With a Week ( date ) query

2007-04-02 Thread Jerry Schwartz
Message- From: Joey [mailto:[EMAIL PROTECTED] Sent: Saturday, March 31, 2007 4:18 AM To: 'Jerry Schwartz' Subject: RE: Help With a Week ( date ) query Hi Jerry, This part of the query is working, but something in the AND part isn't and is failing. SELECT * FROM special WHERE WEEK(NOW(), 7

Help With a Week ( date ) query

2007-03-29 Thread Joey
Hi Guys, I'm kind of at a standstill in coming up with how to get a query I need to write. I'm trying to find a record which matches the week we are in. Example today is Thursday the 29th, it is within the week which has the 26th through the 1st, and if the day is within this week display the

RE: Help With a Week ( date ) query

2007-03-29 Thread Jerry Schwartz
, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Joey [mailto:[EMAIL PROTECTED] Sent: Thursday, March 29, 2007 9:46 AM To: MySQL DB Subject: Help With a Week ( date ) query Hi Guys, I'm kind of at a standstill in coming up with how to get a query I need

RE: Help With a Week ( date ) query

2007-03-29 Thread Jim Ginn
. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Joey [mailto:[EMAIL PROTECTED] Sent: Thursday, March 29, 2007 9:46 AM To: MySQL DB Subject: Help With a Week ( date ) query Hi

Re: HELP WITH A DATE QUERY USING 4.0.17

2005-04-18 Thread John Thorpe
I'm not sure if there is a built-in, but what I usually do for similar things is to use general purpose table to force iteration. E.g. create a table called ITERATE with one column, x, and populate with values 0,1,2,3,4,... -- in your case up to 10 -- and index the column. Then it's easy - I only

HELP WITH A DATE QUERY USING 4.0.17

2005-04-08 Thread shaun thornburgh
Hi, I have a table called Bookings which holds start times and end times for appointments, these are held in Booking_Start_Date and Booking_End_Date. I have a page on my site that runs a query to produce a grid to show availiability per day for the next ten days for each user of the system.

Help with date query

2005-02-04 Thread Jack Lauman
I want to run a nightly cron job where you iterate throught each row of a single table and reset a field depending on the conditions specified. In this case I want to take a date field (RenewalDate) and compare it to the current date less a 30 day grace period and if true reset the

Re: Help with date query

2005-02-04 Thread SGreen
Jack Lauman [EMAIL PROTECTED] wrote on 02/04/2005 11:57:37 AM: I want to run a nightly cron job where you iterate throught each row of a single table and reset a field depending on the conditions specified. In this case I want to take a date field (RenewalDate) and compare it to the

slow date query

2004-12-07 Thread Marc Dumontier
Hi, I'd really appreciate any help in speeding up this type of query SELECT BindId,RecordType from BrowseData WHERE DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07'; On a MYISAM table of 122,000 rows, this query takes very long, in the neighbourhood of 20 minutes. i'm using mysqld

Re: slow date query

2004-12-07 Thread Victor Pendleton
A function on the left hand side will nullify the use of an index. Marc Dumontier wrote: Hi, I'd really appreciate any help in speeding up this type of query SELECT BindId,RecordType from BrowseData WHERE DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07'; On a MYISAM table of 122,000 rows,

RE: slow date query

2004-12-07 Thread Dathan Pattishall
] Subject: slow date query Hi, I'd really appreciate any help in speeding up this type of query SELECT BindId,RecordType from BrowseData WHERE DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07'; On a MYISAM table of 122,000 rows, this query takes very long, in the neighbourhood of 20 minutes

RE: slow date query

2004-12-07 Thread Dathan Pattishall
Pattishall [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 12:05 PM To: Marc Dumontier; [EMAIL PROTECTED] Subject: RE: slow date query Well 1st of all Date_format doesn't allow the use of a key. Do this. SELECT .. WHERE DateLastRevised = '2004-12-07' AND DateLastRevisted '2004-12-08

Re: slow date query

2004-12-07 Thread Marc Dumontier
: Tuesday, December 07, 2004 11:34 AM To: [EMAIL PROTECTED] Subject: slow date query Hi, I'd really appreciate any help in speeding up this type of query SELECT BindId,RecordType from BrowseData WHERE DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07'; On a MYISAM table of 122,000 rows, this query

Re: slow date query

2004-12-07 Thread Jeff Smelser
On Tuesday 07 December 2004 02:03 pm, Victor Pendleton wrote: A function on the left hand side will nullify the use of an index. Sides dont matter, a function on an index, no matter what side, will kill an index. Jeff pgpsVFJcgS9kp.pgp Description: PGP signature

Re: slow date query

2004-12-07 Thread Victor Pendleton
mysql explain select * from queryLog where date_format(queryTime, '%Y-%m-%d') = '2004-11-16'; +--+--+---+--+-+--+--+-+ | table| type | possible_keys | key | key_len | ref | rows | Extra |

Re: slow date query

2004-12-07 Thread Jeff Smelser
On Tuesday 07 December 2004 02:51 pm, you wrote: mysql explain select * from queryLog where date_format(queryTime, '%Y-%m-%d') = '2004-11-16'; mysql explain select * from queryLog where queryTime = date_format('2004-11-16' , '%Y-%m-%d');

Date query and date removal

2004-11-26 Thread darrell troth
This will seem an easy question, but I cannot find a sample anywhere: I have a database of bands appearing at a club. I want to update the list sorted by date and have the results only show current date and beyond (i.e. - remove band that played last night from results page). This query is

Re: Date query and date removal

2004-11-26 Thread Rhino
- Original Message - From: darrell troth [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 26, 2004 3:29 PM Subject: Date query and date removal This will seem an easy question, but I cannot find a sample anywhere: I have a database of bands appearing at a club. I want

Re: Date query and date removal

2004-11-26 Thread Rhino
- Original Message - From: darrell troth [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 26, 2004 3:29 PM Subject: Date query and date removal This will seem an easy question, but I cannot find a sample anywhere: I have a database of bands appearing at a club. I want

Tricky Date Query

2004-09-07 Thread Lee Denny
Hello, I need to perform a select that compares two dates I need to return all records that haven't had date_2 set after a given number of days since date_1. I'm sure this can be done in one query but I just can't get my head around this one. Can anyone help? Cheers, Lee -- MySQL General

Re: Tricky Date Query

2004-09-07 Thread Michael Stassen
If I understand you correctly, I think you want rows with date_2 not greater than or equal to date_1 plus some number of days, say 30. Then date_2 needs to be less than date_1 plus 30 days. So, you would use something like: SELECT * FROM yourtable WHERE date_2 date_1 + INTERVAL 30 DAY;

Re: Tricky Date Query

2004-09-07 Thread Tobias Asplund
On Tue, 7 Sep 2004, Lee Denny wrote: Hello, I need to perform a select that compares two dates I need to return all records that haven't had date_2 set after a given number of days since date_1. ... WHERE date_2 date_1 + INTERVAL X DAY Where X is the number of days. Assuming this is

Re: Tricky Date Query

2004-08-31 Thread Mike Blezien
Michael, Michael Stassen wrote: Mike Blezien wrote: Hello, Not sure this is possible to do with SQL or if needs to be done with in the application programming language we're using(Perl), but I need to get the a weekdate, IE SELECT EXTRACT(DAY FROM NOW()) which would return 30 Now what I need to

Tricky Date Query

2004-08-30 Thread Mike Blezien
Hello, Not sure this is possible to do with SQL or if needs to be done with in the application programming language we're using(Perl), but I need to get the a weekdate, IE SELECT EXTRACT(DAY FROM NOW()) which would return 30 Now what I need to do, is if the query above is greater or less then

Re: Tricky Date Query

2004-08-30 Thread Michael Stassen
Mike Blezien wrote: Hello, Not sure this is possible to do with SQL or if needs to be done with in the application programming language we're using(Perl), but I need to get the a weekdate, IE SELECT EXTRACT(DAY FROM NOW()) which would return 30 Now what I need to do, is if the query above is

Correct date query syntax

2004-08-26 Thread Yong Wang
Hi, All: I have a database which contains date attribute in string format (like 2004-08-12). I want to genearte a report based on period time. I use the syntax: date1 ='2004-08-12' date2='2004-08-18' SELECT * FROM account WHERE (TO_DAYS(date) = TODAYS(date1)) and (TO_DAYS(date) =

Re: Correct date query syntax

2004-08-26 Thread Jochem van Dieten
On Thu, 26 Aug 2004 11:31:46 -0500, Yong Wang [EMAIL PROTECTED] wrote: I have a database which contains date attribute in string format (like 2004-08-12). I want to genearte a report based on period time. I use the syntax: date1 ='2004-08-12' date2='2004-08-18' SELECT * FROM account

Re: Correct date query syntax

2004-08-26 Thread SGreen
I believe you are not letting MySQL do enough work for you. The date format is perfect, even as a string, to perform the comparison you are trying to perform. SELECT @currTime := NOW(); +-+ | @currTime := NOW() | +-+ | 2004-08-26 12:48:16 |

Re: Help with a Date Query Please!

2004-07-12 Thread SGreen
: | | Fax to: | | Subject: Help with a Date Query Please

Help with a Date Query Please!

2004-07-09 Thread shaun thornburgh
Hi, I have a table called Bookings which holds start times and end times for appointments, these are held in Booking_Start_Date and Booking_End_Date. I have a page on my site that runs a query to produce a grid to show availiability per day for the next ten days for each user of the system.

Why Doesn;t this Date Query Work?

2004-02-24 Thread Scott Bailey
Hello All, I have a very strange problem which makes no sense to me whatsoever. I am trying to find the number of queries that the people have dealt with in a database between two dates. The dates are generated from some drop down boxes and dropped into a variable. This is the code for the

Re: Why Doesn;t this Date Query Work?

2004-02-24 Thread Jigal van Hemert
$sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\' and \'$Date2\' GROUP BY Username'; The strange thing is if I replace the $Date2 variable with a date manually it works -. i.e. Not a MySQL issue,

Re: Why Doesn;t this Date Query Work?

2004-02-24 Thread Scott Bailey
Fantastic! This was indeed the problem and has solved it. Many thanks! On Tue, 24 Feb 2004 13:14:51 +0100, Jigal van Hemert wrote: $sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\' and \'$Date2\'

Date query question

2004-01-10 Thread Eric Anderson
I don't have much experience working with dates in Mysql; I've always prefered to manage dates in code, so bear with me. I've got the following definition (yes, no indexes right now): CREATE TABLE se_t ( datestamp timestamp(14) NOT NULL, remote_addr char(16) NOT NULL default '',

Date query problem

2003-12-06 Thread Hseyin DEMRA
Hi,This query is give an error like below;There is a column that name and description are date in Table that also include database.in the table,there are some date like that:2003-12-01,2003-11-16,2003-12-01,2003-12-03,2003-11-19. when i run this query,if i query between 2003-12-01 and

RE: Unusual Date Query

2003-10-11 Thread toby -
fogot to tell you i had a date field in every table im not sure if this is what you r actually looking for but i hope this helps you . good luck toby From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Unusual Date Query Date: Fri, 10 Oct 2003 17:02

Unusual Date Query

2003-10-10 Thread Ross Davis - DataAnywhere.net
I want know if there is a way to return every date between 2 date ranges regardless if there is a row in a table. I have a table that contains daily pricing information and I want to be able to do a mass updated/insert records. I know how to write the updates/inserts if I have table that

Re: Unusual Date Query

2003-10-10 Thread mos
At 12:59 PM 10/10/2003, you wrote: I want know if there is a way to return every date between 2 date ranges regardless if there is a row in a table. I have a table that contains daily pricing information and I want to be able to do a mass updated/insert records. I know how to write the

RE: Unusual Date Query

2003-10-10 Thread Ross Davis - DataAnywhere.net
! -Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 2:00 PM To: Ross Davis - DataAnywhere.net Cc: [EMAIL PROTECTED] Subject: Re: Unusual Date Query At 12:59 PM 10/10/2003, you wrote: I want know if there is a way to return every date between 2 date ranges

Re: Problem with date query

2003-08-14 Thread Roger Baklund
* Jack Lauman I have a table with a column date that contains dates in SQL format, i.e. 2003-08-10 I need to query the table and return all the rows from the current date thru the next 6 days. (i.e. today 2003-08-10 thru Saturday 2003-08-16). I have tried the following query which returns

Problem with date query

2003-08-10 Thread Jack Lauman
I have a table with a column date that contains dates in SQL format, i.e. 2003-08-10 I need to query the table and return all the rows from the current date thru the next 6 days. (i.e. today 2003-08-10 thru Saturday 2003-08-16). I have tried the following query which returns all of the desired

RE: Date query optimization

2003-07-02 Thread Rick Robinson
where clause - you might get surprised. Best of luck, Rick -Original Message- From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 12:25 PM To: [EMAIL PROTECTED] Subject: Date query optimization Hi folks, I do a considerable amount of queries based on a date

Date query optimization

2003-07-01 Thread Karl J. Stubsjoen
Hi folks, I do a considerable amount of queries based on a date, and or date range. I have not had much luck with optimizing these queries. In some cases I use a date field and others a datetime field. The following query searches through 34,000 + records, while specifiying the exact date

Re: Date query optimization

2003-07-01 Thread Keith C. Ivey
On 1 Jul 2003 at 9:25, Karl J. Stubsjoen wrote: ROWS: 34,000 + searched explain select a.submitid,a.url,a.submitdate,a.name,a.company,a.address1,a.city,a.sta te,a.z ipcode,a.country,a.email,a.phone,a.keywords,a.title,a.description,a.su bmitte dby from submit as a inner join re_idx as b on

Re: Date query optimization

2003-07-01 Thread Karl J. Stubsjoen
Keith, The normal way to do a search for a range of dates would be ... WHERE a.submitdate BETWEEN '2003-07-01' AND '2003-07-14'; Is that what you're looking for? submitdate happens to be a DATETIME field. Your suggested query doesn't pull any results. Must I convert the field first?

Re: Date query optimization

2003-07-01 Thread Keith C. Ivey
On 1 Jul 2003 at 10:28, Karl J. Stubsjoen wrote: The normal way to do a search for a range of dates would be ... WHERE a.submitdate BETWEEN '2003-07-01' AND '2003-07-14'; Is that what you're looking for? submitdate happens to be a DATETIME field. Your suggested query doesn't pull

RE: Date Query

2003-05-31 Thread Mike Hillyer
: Prashant Akerkar [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 4:27 AM To: [EMAIL PROTECTED]; Karam Chand; [EMAIL PROTECTED]; Donald Longan; miguel solorzano; [EMAIL PROTECTED] Subject: Date Query Dear Friends I have a Query regarding Displaying Dates I have two field in my mysql Table

Fw: Date Query

2003-05-30 Thread Prashant Akerkar
- Original Message - From: Alexander Keremidarski [EMAIL PROTECTED] To: Prashant Akerkar [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:32 PM Subject: Re: Date Query Hello, Prashant Akerkar wrote: Dear Friends Please ask such kind of questions at genearal

Fw: Date Query

2003-05-30 Thread Prashant Akerkar
- Original Message - From: Alexander Keremidarski [EMAIL PROTECTED] To: Prashant Akerkar [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:32 PM Subject: Re: Date Query Hello, Prashant Akerkar wrote: Dear Friends Please ask such kind of questions at genearal

Date Query

2003-05-30 Thread Prashant Akerkar
- Original Message - From: Prashant Akerkar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:23 PM Subject: Date Query Dear Friends I have a Query regarding Displaying Dates I have two field in my mysql Table for Date_from and Date_To Retrived record was ' 04-08

Fw: Date Query

2003-05-30 Thread Prashant Akerkar
- Original Message - From: Prashant Akerkar To: [EMAIL PROTECTED] ; Karam Chand ; [EMAIL PROTECTED] ; Donald Longan ; miguel solorzano ; [EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:56 PM Subject: Date Query - Original Message - From: Prashant Akerkar [EMAIL PROTECTED

date query.

2003-03-10 Thread Anil Garg
Hi, The date field in my database table looks as below: 07th of March 2003 10:14:29 PM I need to write a query which gets me all the rows which are entered in last to weeks. Any ideas!! Thanks and Regards Anil. - Before

Re: date query.

2003-03-10 Thread Roger Baklund
* Anil Garg The date field in my database table looks as below: 07th of March 2003 10:14:29 PM Then it is probably not a 'date field' in the sense that it is of type date, datetime or timestamp. I need to write a query which gets me all the rows which are entered in last to weeks. Any

Re: date query.

2003-03-10 Thread Bob Ramsey
At 09:36 AM 3/10/2003, Anil Garg wrote: The date field in my database table looks as below: 07th of March 2003 10:14:29 PM Weird. All of my datetime variables look like '2003-03-07 22:14:29'. Are these fields datetime field types or are they text that looks like a date? If they are datetime,

RE: date query.

2003-03-10 Thread Anil Garg
Thanks..that helped. anil :) -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:52 AM To: [EMAIL PROTECTED] Cc: Anil Garg Subject: Re: date query. * Anil Garg The date field in my database table looks as below: 07th of March 2003 10:14:29

Date query

2002-07-17 Thread Erick Hitter
Hello, I run the web site for a band, and I am currently working on the shows list for the band. I have all of the shows listed in a database right now. I don't want to remove the shows that occurred in the past, but instead I want to have a query find only the shows that occur in the future. I

Re: Date query

2002-07-17 Thread denonymous
From: Erick Hitter [EMAIL PROTECTED] Hello, I run the web site for a band, and I am currently working on the shows list for the band. I have all of the shows listed in a database right now. I don't want to remove the shows that occurred in the past, but instead I want to have a query find

Proper date query conversion structure?

2001-06-04 Thread Alec Smith
What would be the correct query to convert a date stored in MySQL in a DATETIME field to month_name month_date, year format at the same time I'm pulling a bunch of other data from the same row as the field with the date I need converted? I've tried something like the below without success:

RE: Proper date query conversion structure?

2001-06-04 Thread Don Read
On 04-Jun-01 Alec Smith wrote: What would be the correct query to convert a date stored in MySQL in a DATETIME field to month_name month_date, year format at the same time I'm pulling a bunch of other data from the same row as the field with the date I need converted? I've tried something

Date query problem (hard one)

2001-03-08 Thread Adams, Antoine A SSI-ISES-56
I've been strugling with a query for some time now and I can't get the desired answer from mysql. The desired answer: a date (bv. 2001-02-08) What is the input: a week number What date do I need: The date of the monday where week = x the idea was: select date(week(10),1); But offcourse

Re: Date query problem (hard one)

2001-03-08 Thread Peter Skipworth
Antione, What's your definition of a week number ? A week number in the range 1..52 is not in itself enough to calculate a precise date from.. regards, P On Thu, 8 Mar 2001, Adams, Antoine A SSI-ISES-56 wrote: I've been strugling with a query for some time now and I can't get the desired