date question..

2004-09-10 Thread bruce
i have a tbl with the following... foo date1 foo2 date2 etc... how can i do a select to get the last or 1st row based on the (latest/earliest) date? can't seem to get it to work.. thanks -bruce -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: date question..

2004-09-10 Thread gerald_clark
bruce wrote: i have a tbl with the following... foo date1 foo2 date2 etc... how can i do a select to get the last or 1st row based on the (latest/earliest) date? SELECT * FROM tbl order by datecolumn DESC LIMIT 1; SELECT * FROM tbl order by datecolumn ASC LIMIT 1; can't seem to get it to work..

RE: date question..

2004-09-10 Thread bruce
AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: date question.. bruce wrote: i have a tbl with the following... foo date1 foo2 date2 etc... how can i do a select to get the last or 1st row based on the (latest/earliest) date? SELECT * FROM tbl order by datecolumn DESC LIMIT

Re: date question..

2004-09-10 Thread Michael Stassen
/comments regards, -bruce -Original Message- From: gerald_clark [mailto:[EMAIL PROTECTED] Sent: Friday, September 10, 2004 11:12 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: date question.. bruce wrote: i have a tbl with the following... foo date1 foo2 date2 etc... how can i

RE: date question..

2004-09-10 Thread bruce
PROTECTED] Subject: Re: date question.. The manual describes 3 solutions to this problem http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html. Michael bruce wrote: the earlier suggestion didn't work, as it only returned a single value... here's the entire issue i have

strange group/max date question...

2004-09-10 Thread bruce
hi... i have the following select... select itemID, process, status, tblType, max(date) from historyTBL where (tblType = '3' or tblType = '2') group by tblType; it seems to work, in that it gives me the rows for the two types that i'm grouping by. the problem is that i want the row that

Re: strange group/max date question...

2004-09-10 Thread Andrew Kreps
Have you tried this: select ..., max(date) as mdate from ... where ... group by ... order by mdate desc ? I haven't tested it, but it should order the results by max date descending, giving you the greatest date first. On Fri, 10 Sep 2004 18:16:00 -0700, bruce [EMAIL PROTECTED] wrote: hi...

Re: strange group/max date question...

2004-09-10 Thread Michael Stassen
bruce wrote: hi... i have the following select... SELECT itemID, process, status, tblType, MAX(date) FROM historyTBL WHERE (tblType = '3' or tblType = '2') GROUP BY tblType; it seems to work, in that it gives me the rows for the two types that i'm grouping by. the problem is that i want the row

Date Question 2

2004-05-10 Thread H Bartel
Hi again, I got the MONTH() selection thing working now, but it seems like I'm not getting the hang of the concept with the sql date.. With PHP and a UNIX timestamp I would just insert a timestamp, the select it and after selection, go ahead and manipulate it to fit my needs, like extracting day

Re: Date Question 2

2004-05-10 Thread Mihail Manolov
: Monday, May 10, 2004 1:56 PM Subject: Date Question 2 Hi again, I got the MONTH() selection thing working now, but it seems like I'm not getting the hang of the concept with the sql date.. With PHP and a UNIX timestamp I would just insert a timestamp, the select it and after selection, go ahead

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:

Re: mysql or pathon date question

2003-02-24 Thread Dan Nelson
In the last episode (Feb 24), Vivian Wang said: 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. Mysql's date_format function supports the same escapes

Re: Date Question

2002-05-29 Thread Victoria Reznichenko
Ed, Wednesday, May 29, 2002, 2:24:40 AM, you wrote: EL I'm not sure how to phrase this. Please excuse the crudeness of my description. EL I'm storing calendar data in a MySQL database and I'm wondering, is there a EL way to specify a day, such as the 28th, and fourth Tuesday as search EL

Date Question

2002-05-28 Thread Ed Lazor
I'm not sure how to phrase this. Please excuse the crudeness of my description. I'm storing calendar data in a MySQL database and I'm wondering, is there a way to specify a day, such as the 28th, and fourth Tuesday as search criteria when selecting rows from a table with a field of type date?

date question

2002-05-17 Thread Taylor Lewick
for mysql, if I have a text file that has the date as 5/17/2002, is there a way I can translate that to mysql's version of the date, i.e. 2002-05-17? With Load Data as well? Thanks, Taylor Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 Help Wanted. Seeking Telepath...

again date question

2002-04-04 Thread saraswathy saras
hi, I have some more problem with date query. 1.how to return month from numeric to aalpabet.04-Apr. 2.how to return day or month without 0 in front. i mean if day is 01-1,same also month if 02-2. Is it possible.please help me. Thanks in advance.

Re: again date question

2002-04-04 Thread Anvar Hussain K.M.
Hi, 1. date_format(datecolumn,'%b'); 2. date_format(datecolumn,'%d)+0; or if you want a string result trim(leading '0' from date_format(datecolumn,'%d)); The manual has very clear description of date functions. Anvar. At 01:47 AM 05/04/2002 +, you wrote: hi, I have some more

Hello! Date question....

2002-02-12 Thread Jim Hatridge
Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date in the indate column. Is there anyway

RE: Hello! Date question....

2002-02-12 Thread Eric Mayers
[mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 9:50 AM To: [EMAIL PROTECTED] Subject: Hello! Date question =20 Hi all... =20 This is my first post to the list. I've been working on MySQL=20 now for about a=20 week and really like it. I have a question that I can't find=20 in any

Re: Hello! Date question....

2002-02-12 Thread DL Neil
Hi Jim, Welcome to our relatively?relationally happy band. This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. A whole week and no post... When I add a line to my

RE: Hello! Date question....

2002-02-12 Thread John Lodge
See the manual reference to the 'timestamp' type. -Original Message- From: Jim Hatridge [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 5:50 PM To: [EMAIL PROTECTED] Subject: Hello! Date question Hi all... This is my first post to the list. I've been working on MySQL

Re: Hello! Date question....

2002-02-12 Thread Paul DuBois
At 18:49 +0100 2/8/02, Jim Hatridge wrote: Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date

Re: Hello! Date question....

2002-02-09 Thread Jim Hatridge
On Friday 08 February 2002 19:28, Eric Mayers wrote: Jim, What you're asking about is the timestamp data type. Look at : http://www.mysql.com/doc/D/A/DATETIME.html In a nutshell, if you assign 'null' to a timestamp column it will put in value of 'NOW()'. Eric Mayers Software Engineer

Hello! Date question....

2002-02-08 Thread Jim Hatridge
Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date in the indate column. Is there anyway

Re: Hello! Date question....

2002-02-08 Thread Paul DuBois
At 18:49 +0100 2/8/02, Jim Hatridge wrote: Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. When I add a line to my customer's table I need it to put today's date

RE: Hello! Date question....

2002-02-08 Thread Eric Mayers
:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 9:50 AM To: [EMAIL PROTECTED] Subject: Hello! Date question Hi all... This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books

Re: Hello! Date question....

2002-02-08 Thread DL Neil
Hi Jim, Welcome to our relatively?relationally happy band. This is my first post to the list. I've been working on MySQL now for about a week and really like it. I have a question that I can't find in any of the books or how-tos. A whole week and no post... When I add a line to my