RE: date conversion

2003-07-16 Thread Rudy Metzger
SELECT concat( substring_index(DATE,'-',-1), '-', lpad( field(substring_index(substring_index(DATE,'-',2),'-',-1), 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug', 'Sep','Oct','Nov','Dec'), 2,'0

Find entry with max date.

2003-07-15 Thread Petre Agenbag
one max date. ie. main_table: id namesurname date 1 johndoe 2003-07-07 2 janedoe 2003-07-08 contact_table main_id date 1 2003-07-09 1 2003-07-12 2 2003-07-09 complaints_table main_id

RE: Find entry with max date.

2003-07-15 Thread Rudy Metzger
PROTECTED] Sent: dinsdag 15 juli 2003 9:25 To: [EMAIL PROTECTED] Subject: Find entry with max date. Hi I have a relational db with a couple of tables holding things like comments and complaints and actions. In the main table, I have the contact details. What I'd like to do is to query the db

DATE COMPARISON

2003-07-15 Thread Miguel Perez
Hi: I was wondering if there is a date function to get the older date between two dates?. Or smething that indicates me that one date is older than the other one. I know that I have the function YEAR,MONTH,DAY and I can use them, but I don't know if exists a function that can do the same

Re: DATE COMPARISON

2003-07-15 Thread Jeff Weeks
Miguel - You can compare dates directly using and - no need for a special function. Dates are older when they are less than other dates. Cheers. Jeff On Tuesday, July 15, 2003, at 09:36 AM, Miguel Perez wrote: Hi: I was wondering if there is a date function to get the older date between

Re: DATE COMPARISON

2003-07-15 Thread Brent Baisley
This would do it if you are just comparing two dates: $max_date = ($date1$date2?$date1:$date2); It's just using the one line form of an if statement. Note that the function is incorrect if they date are equal. On Tuesday, July 15, 2003, at 12:36 PM, Miguel Perez wrote: I was wondering

RE: Pull updated Records without a date field?

2003-07-11 Thread Rudy Metzger
a date field? Hello, Is there a way to pull all updated records without having a date field in each record? -- Keith -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List

Re: ORDER BY with Date Format

2003-07-11 Thread Ray
probably one of the many replys you'll get on this, but ORDER BY month(start_date) assuming the column that has the date is start_date On Thursday 10 July 2003 14:51, Mike At Spy wrote: I am trying to create an order by in a select statement that takes a standard 'date' column in a table

Pull updated Records without a date field?

2003-07-10 Thread Keith Hamilton
Hello, Is there a way to pull all updated records without having a date field in each record? -- Keith -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Pull updated Records without a date field?

2003-07-10 Thread Paul DuBois
At 11:38 -0500 7/10/03, Keith Hamilton wrote: Hello, Is there a way to pull all updated records without having a date field in each record? How do you determine which records have been updated in that case? -- Keith -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL

Re: Pull updated Records without a date field?

2003-07-10 Thread Ryan McDougall
--- Paul DuBois [EMAIL PROTECTED] wrote: At 11:38 -0500 7/10/03, Keith Hamilton wrote: Hello, Is there a way to pull all updated records without having a date field in each record? -- Keith Can't you just do: select field from table where datefield somedate; That way the date

ORDER BY with Date Format

2003-07-10 Thread Mike At Spy
I am trying to create an order by in a select statement that takes a standard 'date' column in a table and sorts the returned data by the month of that date. Off hand, I tried ORDER BY start_date(m) And I know that is wrong. Anyone have any suggestions? Thanks, -Mike -- MySQL General

RE: Pull updated Records without a date field?

2003-07-10 Thread Andrew Braithwaite
Is there a way to pull all updated records without having a date field in each record? No. Generally speaking it's a good idea to have a timestamp field in these oft updated tables to perform just the kind of operation you describe. Cheers, Andrew -Original Message- From: Keith

RE: ORDER BY with Date Format

2003-07-10 Thread Andrew Braithwaite
Try: order by left(start_date,7) That will order by year then month for a standard date column.. Cheers, Andrew -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Thursday 10 July 2003 20:51 To: [EMAIL PROTECTED] Subject: ORDER BY with Date Format I am trying

date and time

2003-07-08 Thread awarsd
Hi, can someone explain me the avantage of using date and time, and also can i set time + XX minutes?? Thanx Anthony

Re: date and time

2003-07-08 Thread William R. Mussatto
Hi, can someone explain me the avantage of using date and time, and also can i set time + XX minutes?? Thanx Anthony Short answer is: You can use the date and time functions and formats. There is one or just use '+' or '-' See chapter 6 in the ref. manual. If you need both date and time

4.0.14 Date?

2003-07-08 Thread Christian Nelson
Greetings... We're eagerly awaiting 4.0.14 since it fixes the SET FOREIGN_KEY_CHECKS bug. http://www.mysql.com/doc/en/InnoDB_news-4.0.14.html says it should be released in June... it's now July 8th. When can we expect 4.0.14 to be released? Thanks in advance... Christian

Re: 4.0.14 Date?

2003-07-08 Thread Heikki Tuuri
Christian, - Original Message - From: Christian Nelson [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Tuesday, July 08, 2003 10:51 PM Subject: 4.0.14 Date? Greetings... We're eagerly awaiting 4.0.14 since it fixes the SET FOREIGN_KEY_CHECKS bug. http://www.mysql.com

Re: 4.0.14 Date?

2003-07-08 Thread Jeremy Zawodny
On Tue, Jul 08, 2003 at 12:49:54PM -0700, Christian Nelson wrote: Greetings... We're eagerly awaiting 4.0.14 since it fixes the SET FOREIGN_KEY_CHECKS bug. http://www.mysql.com/doc/en/InnoDB_news-4.0.14.html says it should be released in June... it's now July 8th. When can we expect

RE: Date query optimization

2003-07-02 Thread Rick Robinson
Hi Karl- I often use a unix timestamp value for my dates (an unsigned mediumint is adequate) and index that. However, using date/time functions in the where clause does have a significant impact on the execution times, even when the index is used and the EXPLAIN output appears the same. See

date format

2003-07-01 Thread Fabio Bernardo
today´s date: 2003-07-01 Hi there,,, I wrote down this statement select (current_date - 1 ) and the result was: (Currentdate -1) --- 20030700 when i write select (current_date ) I have: (Currentdate) --- 2003-07-01

RE: date format

2003-07-01 Thread Andrew Braithwaite
: date format today´s date: 2003-07-01 Hi there,,, I wrote down this statement select (current_date - 1 ) and the result was: (Currentdate -1) --- 20030700 when i write select (current_date ) I have: (Currentdate) --- 2003-07

Re: date format

2003-07-01 Thread Keith C. Ivey
On 1 Jul 2003 at 11:31, Fabio Bernardo wrote: select (current_date - 1 ) and the result was: (Currentdate -1) --- 20030700 Use this instead: SELECT CURRENT_DATE() - INTERVAL 1 DAY; The documentation for DATE_ADD() and other date and time

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 a.submitid = b.submitid where year(a.submitdate)=2003 and month(a.submitdate)=7 and dayofmonth(a.submitdate)=1; --and year(a.submitdate)=2003 and month(a.submitdate)=7 and dayofmonth(a.submitdate)15; Notice the 2nd where statement, this is how I typically do my date queries (and it is slow

Re: Date query optimization

2003-07-01 Thread Karl J. Stubsjoen
? But then is my query unoptimized? Should I consider storing date parts into my database; seperate column for year - month - date and (time parts..) Karl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

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: CREATE TABLE with date as part of table name

2003-06-23 Thread Egor Egorov
in MySQL based on todays date. The system I am working on at the moment is Win2k. You can do it with MySQL only. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net

CREATE TABLE with date as part of table name

2003-06-22 Thread Me
I would like to know how to create a table within MySQL at the command prompt where the table name will be something like: MyTableName_TodaysDate Is this possible while at the command prompt? I am trying to create a batch file that will create a table in MySQL based on todays date

odd Date

2003-06-20 Thread Miguel Perez
Hi: I have the following problem: When I insert a date in my table, and after do the insert I select the column date to see if the date is right but it displays the date like follows: 2019-06-20 When the original insert is: 2003-06-19 I looked into the manual to figure out how mysql works

RE: odd Date

2003-06-20 Thread Jay Blanchard
[snip] When I insert a date in my table, and after do the insert I select the column date to see if the date is right but it displays the date like follows: 2019-06-20 When the original insert is: 2003-06-19 [/snip] Please show us your insert query. Jay -- MySQL General Mailing List

RE: odd Date

2003-06-20 Thread Miguel Perez
='', colorProducto='', esGarantiaReparacion='1' Best Regards From: Jay Blanchard [EMAIL PROTECTED] To: Miguel Perez [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: odd Date Date: Fri, 20 Jun 2003 09:21:06 -0500 [snip] When I insert a date in my table, and after do the insert I select the column date to see

RE: odd Date

2003-06-20 Thread Jay Blanchard
[snip] insert into OrdenServicio set folioOrdenServicio='', idCanal='1', idTienda='107', idPedido='306', idProducto='503578', fallaCliente='no prende', idEntregaControl='1', numSerie='7349843', estaComponenteBase='1', observaciones='', idStatusOrden='7', idCanalLevantamiento='1',

RE: odd Date

2003-06-20 Thread Miguel Perez
', `idLinea` int(8) NOT NULL default '0', `esReparacionInterna` tinyint(1) NOT NULL default '0', `otroAccesorio` varchar(255) NOT NULL default '', `idFalla` int(8) NOT NULL default '0', `idTaller` int(11) NOT NULL default '0', `idCentroServicio` int(11) NOT NULL default '0', `fechaLevantamiento` date

Re: odd Date

2003-06-20 Thread Roger Baklund
* Miguel Perez I have the following problem: When I insert a date in my table, and after do the insert I select the column date to see if the date is right but it displays the date like follows: 2019-06-20 When the original insert is: 2003-06-19 You would get this result if you

Re: odd Date

2003-06-20 Thread Miguel Perez
Hi: The weird thing is that not always do the same, I mean I always introduce that insert query, but not always inserts a wrong date, sometimes the date is correct. Mikel From: Roger Baklund [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: Miguel Perez [EMAIL PROTECTED] Subject: Re: odd Date Date

RE: odd Date

2003-06-20 Thread Jay Blanchard
[snip] insert into OrdenServicio set folioOrdenServicio='', idCanal='1', idTienda='107', idPedido='306', idProducto='503578', fallaCliente='no prende', idEntregaControl='1', numSerie='7349843', estaComponenteBase='1', observaciones='', idStatusOrden='7', idCanalLevantamiento='1',

Re: DATE

2003-06-15 Thread Don Read
On 12-Jun-2003 Wong Zach-CHZ013 wrote: Hi 1 - I have a column whose datatype is longtext. Its content is 08/06/2003; I created a new column whose datatype is DATE. Its content is null now. How do write a SQL statement that inputs each row from 08/06/2003 in the old column to 2003-08-06

Loading Date DATA

2003-06-13 Thread Patrick Shoaf
I have a question, when loading dates into mysql I have found I can always use MMDD or -MM-DD, but frequently I need to load data from ASCII csv files where the date is M/D/. Currently, I am using perl to read the datafile and insert each record after converting the date data. I

Re: Loading Date DATA

2003-06-13 Thread Egor Egorov
Patrick Shoaf [EMAIL PROTECTED] wrote: I have a question, when loading dates into mysql I have found I can always use MMDD or -MM-DD, but frequently I need to load data from ASCII csv files where the date is M/D/. Currently, I am using perl to read the datafile and insert each

DATE - longtext

2003-06-12 Thread Wong Zach-CHZ013
Hi I have a database whose table has a column, which has a datatype longtext. I then try a query mysql select MY_DATE from my_table where MLC_DATE between '09/22/2003' AND '10/21/2 003'; I thought it would fail since the datatype isnt DATE nor TIMESTAMP. But from the result, it seems to work. 1

Re: DATE - longtext

2003-06-12 Thread Paul DuBois
At 14:44 -0500 6/12/03, Wong Zach-CHZ013 wrote: Hi I have a database whose table has a column, which has a datatype longtext. I then try a query mysql select MY_DATE from my_table where MLC_DATE between '09/22/2003' AND '10/21/2 003'; I thought it would fail since the datatype isnt DATE nor

DATE

2003-06-12 Thread Wong Zach-CHZ013
Hi 1 - I have a column whose datatype is longtext. Its content is 08/06/2003; I created a new column whose datatype is DATE. Its content is null now. How do write a SQL statement that inputs each row from 08/06/2003 in the old column to 2003-08-06 in a new column ? Eg: old column name - my_date

Re: DATE

2003-06-12 Thread Paul DuBois
At 16:23 -0500 6/12/03, Wong Zach-CHZ013 wrote: Hi 1 - I have a column whose datatype is longtext. Its content is 08/06/2003; I created a new column whose datatype is DATE. Its content is null now. How do write a SQL statement that inputs each row from 08/06/2003 in the old column to 2003-08-06

DATE

2003-06-12 Thread Wong Zach-CHZ013
Hi How do I rename a new column ? How do I drop a column ? From MySQL documentation, it refers to rename/drop table. I dont want to do that. Thanks Paul for your aid. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

RE: DATE

2003-06-12 Thread Mike Hillyer
Use the ALTER TABLE syntax, see http://www.mysql.com/doc/en/ALTER_TABLE.html Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Wong Zach-CHZ013 [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 3:43 PM To: 'Paul DuBois'; [EMAIL PROTECTED] Subject: DATE Hi How do I

Re: DATE

2003-06-12 Thread Paul DuBois
At 16:43 -0500 6/12/03, Wong Zach-CHZ013 wrote: Hi How do I rename a new column ? How do I drop a column ? From MySQL documentation, it refers to rename/drop table. I dont want to do that. Use the ALTER TABLE statement: http://www.mysql.com/doc/en/ALTER_TABLE.html Thanks Paul for your aid. --

Help with Date Range Query

2003-06-06 Thread Trevor Sather
Hello, Any idea why the following doesn't work? It's taken from the MySQL manual which says it should return records in the last 30 days. As you can see, I'm getting records spanning some 19 months from last May to December 2004... mysql SELECT StartDate FROM Events - WHERE TO_DAYS(NOW())

RE: Help with Date Range Query

2003-06-06 Thread Mike Hillyer
Well, when I do this query: select to_days(now()) - to_days('2004122600'); I get -569, which is much less than 30, any date in the future will be negative. You may want to do this if you are looking for this style of query: SELECT StartDate FROM Events WHERE 0 = TO_DAYS(NOW()) - TO_DAYS

Re: Help with Date Range Query

2003-06-06 Thread gerald_clark
Because now - a future date is a negative number, and therefore 30. Trevor Sather wrote: Hello, Any idea why the following doesn't work? It's taken from the MySQL manual which says it should return records in the last 30 days. As you can see, I'm getting records spanning some 19 months from

Re: Help with Date Range Query

2003-06-06 Thread Paul DuBois
probably assumes implicitly that you have no dates in the future, in which case it does return records that occur with the last 30 days. More precisely, the query returns records with a date greater than the date 30 days ago (i.e., with a date no older than 30 days ago). Add AND StartDate = NOW

RE: Help with Date Range Query

2003-06-06 Thread Trevor Sather
Thanks very much (to all who replied) -- this looks good! Best wishes -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: 06 June 2003 20:46 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Help with Date Range Query At 20:34 +0100 6/6/03, Trevor Sather wrote

Re: Help with Date Range Query

2003-06-06 Thread Keith C. Ivey
On 6 Jun 2003 at 20:34, Trevor Sather wrote: mysql SELECT StartDate FROM Events - WHERE TO_DAYS(NOW()) - TO_DAYS(StartDate) = 30; ++ | StartDate | ++ | 2004122600 | | 2003072100 | | 2003080600 | | 2003092600 | | 2003051000 |

RE: Help with Date Range Query

2003-06-06 Thread Keith C. Ivey
On 6 Jun 2003 at 13:43, Mike Hillyer wrote: SELECT StartDate FROM Events WHERE 0 = TO_DAYS(NOW()) - TO_DAYS(StartDate) = 30; I don't think that's doing what you think it is. In math notation = can be chained that way, but not in most programming languages. 0 = x = 30 is equivalent to

RE: Help with Date Range Query

2003-06-06 Thread Mike Hillyer
Aah, I stand corrected. Friday afternoon is not my best day to be answering questions on here. ;) Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Keith C. Ivey [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 1:59 PM To: [EMAIL PROTECTED] Subject: RE: Help with Date

Extracting DATE from a TIMESTAMP field

2003-06-06 Thread Alex Pilson
I have an old table that has about 2000 records and hasn't been modified. I realized it was missing a create_date. Do anyone know or have any slick SQL code to extract out the date from the timestamp field and update and insert the date into the create_date field? Thanks

Re: Extracting DATE from a TIMESTAMP field

2003-06-06 Thread Paul DuBois
At 17:17 -0400 6/6/03, Alex Pilson wrote: I have an old table that has about 2000 records and hasn't been modified. I realized it was missing a create_date. Do anyone know or have any slick SQL code to extract out the date from the timestamp field and update and insert the date

Re: Extracting DATE from a TIMESTAMP field

2003-06-06 Thread Alex Pilson
At 4:22 PM -0500 6/6/03, Paul DuBois wrote: At 17:17 -0400 6/6/03, Alex Pilson wrote: I have an old table that has about 2000 records and hasn't been modified. I realized it was missing a create_date. Do anyone know or have any slick SQL code to extract out the date from the timestamp field

Re: Extracting DATE from a TIMESTAMP field

2003-06-06 Thread Paul DuBois
out the date from the timestamp field and update and insert the date into the create_date field? Thanks! -- --- Alex Pilson FlagShip Interactive, Inc. [EMAIL PROTECTED] 404.642.8225 CELL

Re: date/datetime checking too strict in 4.1?

2003-06-03 Thread Victoria Reznichenko
to accomplish no purpose. And then I found out that the same query on a DATE field *did* work as expected. It works on a DATE but not on a DATETIME. Where's the logic in that? If possible, I would like to find someplace that has more details on the nature of the change that was made to date

Re: Automatic calculation of date additions

2003-06-01 Thread Victoria Reznichenko
Alex Thurgood [EMAIL PROTECTED] wrote: Le lun 26/05/2003 ? 21:00, [EMAIL PROTECTED] a ?crit : From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Automatic calculation of date additions Date: 26 May 2003 15:57:41 + Alex Thurgood [EMAIL PROTECTED] wrote

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

date/datetime checking too strict in 4.1?

2003-05-31 Thread Daniel DeLorme
that the same query on a DATE field *did* work as expected. It works on a DATE but not on a DATETIME. Where's the logic in that? If possible, I would like to find someplace that has more details on the nature of the change that was made to date/datetime checking. The changelog for 4.1.0 isn't very

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

Re: How to handle Date related types in Java?

2003-05-29 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Venkata Srinivasa Rao, Yerra wrote: Dear All, Any body know how to handle DATE related types in Java. It seems JDBC driver fails to construct java.sql.TimeStamp object or java.sql.Date object. Thanks in Advance. Best Regards, Srinivas

How to handle Date related types in Java?

2003-05-28 Thread Venkata Srinivasa Rao, Yerra
Dear All, Any body know how to handle DATE related types in Java. It seems JDBC driver fails to construct java.sql.TimeStamp object or java.sql.Date object. Thanks in Advance. Best Regards, Srinivas. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http

Re: date ranges

2003-04-03 Thread Matt Gostick
I have a date range (start date and end date) supplied by the user and I also have information in a table that has start dates and end dates. I want to select everything in the table whose date range overlaps in any way with the date range given by the user. Well... if you were given

Re: date ranges

2003-04-03 Thread Bruce Feist
Matt Gostick wrote: Sarah Heffron wrote: I have a date range (start date and end date) supplied by the user and I also have information in a table that has start dates and end dates. I want to select everything in the table whose date range overlaps in any way with the date range given

Re: date ranges

2003-04-03 Thread Bruce Feist
Bruce Feist wrote: Instead, if the four dates are s1, e1, s2, and e2 (s=start, e=end), we want: s1 = e2 /* first range can't start after second range ends */ AND s2 = e1 /* second range can't start after first range ends */ Bruce Feist also wrote: Your original suggestion works if

date ranges

2003-04-02 Thread Sarah Heffron
How would I do this: I have a date range (start date and end date) supplied by the user and I also have information in a table that has start dates and end dates. I want to select everything in the table whose date range overlaps in any way with the date range given by the user. Thanks

Re: date ranges

2003-04-02 Thread Matt Gostick
Well... if you were given a start date of 2003-01-01 and end date of 2003-01-31... select * from table_name where start_date between 2003-01-01 and 2003-01-31 or end_date between 2003-01-01 and 2003-01-31 No? Matt. On Wed, 2003-04-02 at 16:32, Sarah Heffron wrote: How would I do

Re: date ranges

2003-04-02 Thread Bruce Feist
Matt Gostick wrote: Well... if you were given a start date of 2003-01-01 and end date of 2003-01-31... select * from table_name where start_date between 2003-01-01 and 2003-01-31 or end_date between 2003-01-01 and 2003-01-31 No? No. Example: start_date = 2002-01-01 and end_date = 2003

get record last updated date

2003-03-31 Thread Mike Doanh Tran
Hi, Is there a way in mysql to get the record's last updated date? Thanks, Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: get record last updated date

2003-03-31 Thread Matt Gostick
, then I don't know, and would be interested in the real answer. Matt. On Mon, 2003-03-31 at 13:21, Mike Doanh Tran wrote: Hi, Is there a way in mysql to get the record's last updated date? Thanks, Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com

DATE function question

2003-03-26 Thread Tom Ray
I have a small question about the DATE function. This is what I want to do: - User enters information into form and submits it to database - When info is added to database the current date is stored ala 2003-03-26 - Now I want to take that date 2003-03-26 and tack on either 15 or 30 days

Re: DATE function question

2003-03-26 Thread Serge Paquin
I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for date functions if the above doesn't work. Serge. On Wed, 26 Mar 2003 10:16:18 -0500 Tom Ray [EMAIL PROTECTED] wrote: I have

RE: DATE function question

2003-03-26 Thread Mark Armendariz
] Subject: Re: DATE function question I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for date functions if the above doesn't work. Serge. On Wed, 26 Mar 2003 10:16:18 -0500 Tom Ray

Re: DATE function question

2003-03-26 Thread Serge Paquin
],Interval 15 day) Mark -Original Message- From: Serge Paquin [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 10:35 AM To: [EMAIL PROTECTED] Subject: Re: DATE function question I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost

date problem

2003-03-23 Thread nobody
Hello mysql, I do this: $query = INSERT INTO news(ID, author, title, text, date) VALUES(NULL, '.$_SESSION[ulogged].', '.$title.', '.$text.', UNIX_TIMESTAMP(NOW())); $result = mysql_query($query, $connection) or die(problem with query); I get this: mysql select * from news where id='1

RE: date problem

2003-03-23 Thread Michael Shulman
It looks like it's in now() format, but without the punctuation. The line from your insert statement is 20030323225645 If we break this apart, we see: Year = 2003 Month = 03 Date = 23 Hour = 22 (or 10pm) Minute 56 Seconds 45 Someone else on the list: where or how is the timezone encode

Re[2]: date problem

2003-03-23 Thread nobody
| date | +++--+-++ | 1 | myuser | news | blah blah blah | 20030323225645 | | 2 | myuser | news2| yakidi shmakidi | 20001117212520

RE: date problem

2003-03-23 Thread Don Read
in a timestamp column and probably clobbering his values. 20030323225645 If we break this apart, we see: Year = 2003 Month = 03 Date = 23 Hour = 22 (or 10pm) Minute 56 Seconds 45 Nope, that's a MySQL timestamp. UNIX_TIMESTAMPS are # of seconds since the epoch (Jan 1 1970). nobody

Re[2]: date problem

2003-03-23 Thread nobody
Month = 03 Date = 23 Hour = 22 (or 10pm) Minute 56 Seconds 45 DR Nope, that's a MySQL timestamp. DR UNIX_TIMESTAMPS are # of seconds since the epoch (Jan 1 1970). DR nobody [EMAIL PROTECTED] is probably trying to store an INT in a timestamp DR column and clobbering his values

RE: Newbie - How can I insert new data with the current date/time?

2003-03-16 Thread Uttam
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2003 20:08 To: [EMAIL PROTECTED] Subject: Newbie - How can I insert new data with the current date/time? I have a table called animals (using the example in the MySQL guide). I have a datetime column type. Here is the table: create

Re: Newbie - How can I insert new data with the current date/time?

2003-03-16 Thread KKolle
: Subject: Re: Newbie - How can I insert new data with the current 03/15/2003date/time? 10:37 AM

RE: Newbie - How can I insert new data with the current date/time?

2003-03-16 Thread KKolle
Great, this is more of what I was looking fora way to have the DB auto populate the date/time in a column, without having to use sql. Thanks again! Uttam

Newbie - How can I insert new data with the current date/time?

2003-03-15 Thread KKolle
I have a table called animals (using the example in the MySQL guide). I have a datetime column type. Here is the table: create table bug_master ( id MEDIUMINT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, date DATETIME NOT NULL

Re: Newbie - How can I insert new data with the current date/time?

2003-03-15 Thread Paul DuBois
, name CHAR(30) NOT NULL, date DATETIME NOT NULL, PRIMARY KEY (id) ); I want to do a simple insert into the table with the current date and time, i.e. the system date. I'm having some problems finding the correct sql syntax to do this. Could

I want sql query result with userid 1st col followed by 1colum for each date all corresp numbers

2003-03-13 Thread DANIEL GADDIS
I have 1 table with 3 fields: date, userid, and a number. I would like an sql query result with the userid for the first column followed by 1 column for each date and all corresponding numbers displayed for that userid for that date. Is there a way to do this using just sql and not php or some

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

Data query by date

2003-03-03 Thread Throbware Support
Hi all. I have spent some time studying the manual and previous posts, trying to get a grip on the whole date_format issue... I am VERY new to MySQL having been converted from an ADO/DAO environment with Access dBs... Where I am having trouble is coming up for a syntax to SELECT * FROM tableA

Re: Data query by date

2003-03-03 Thread Paul DuBois
. Any hint of where I am going wrong would be greatly appreciated ;-) Well, for one thing, if ba_make_date is a DATETIME column, you're comparing it to what looks like a DATE value. That may make a difference, if the ba_make_date values don't have 00:00:00 in the time part. What's the CC you're

Mysql and Import into MS Access with Date Time

2003-02-26 Thread MySQL
Hi all, It seems that MS Access can't find out how to convert the mysql Time Type in a table. Lets say i got 3 colums in a table like this: create table test (id int(4)auto_increment,dato date,tid time, primary key (id)); insert into test values ('',curdate(),curtime()); insert into test

mysql or pathon date question

2003-02-24 Thread Vivian Wang
mysql, The question is: If I use unix date Command like: date -date=20030220 +%j I will get 051 which is Julian date. I like to know how I can get Julian date if I use mysql or Python. Thanks. - Before posting, please check

<    5   6   7   8   9   10   11   12   13   14   >