Re: select between date

2006-08-29 Thread Penduga Arus
On 8/3/06, Penduga Arus [EMAIL PROTECTED] wrote: On 8/1/06, Chris [EMAIL PROTECTED] wrote: Did you look at the link David sent you? http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html thanks.. I manage to do that.. below is my solution. please advice if there is any better

Re: select between date

2006-08-29 Thread Douglas Sims
You have a table containing birthdates (date field, including year) and you want to display all rows for which the birthday will occur in the next week (seven days). You tried this query: SELECT a017namaper, DATE_FORMAT(a017tkhlahir, '%e/%c/%Y') as a017tkhlahir, MONTH(a017tkhlahir) as

Re: select between date

2006-08-03 Thread Penduga Arus
On 8/1/06, Chris [EMAIL PROTECTED] wrote: Did you look at the link David sent you? http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html thanks.. I manage to do that.. below is my solution. please advice if there is any better solution SELECT a017namaper,

select between date

2006-07-31 Thread Penduga Arus
I want to do a program to display birthday for our staff. I have a field named birthday with date format (-mm-dd), from this field I want to display the staff who will have their birthday start from current date to 7 days a head. please help, thanks in advance -- MySQL General Mailing List

RE: select between date

2006-07-31 Thread Logan, David (SST - Adelaide)
July 2006 9:03 PM To: mysql@lists.mysql.com Subject: select between date I want to do a program to display birthday for our staff. I have a field named birthday with date format (-mm-dd), from this field I want to display the staff who will have their birthday start from current date to 7 days

RE: select between date

2006-07-31 Thread Peter Lauri
What version of MySQL do you have? Depending on that, there are different methods. -Original Message- From: Penduga Arus [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 6:33 PM To: mysql@lists.mysql.com Subject: select between date I want to do a program to display birthday

Re: select between date

2006-07-31 Thread Chris
Penduga Arus wrote: On 7/31/06, Peter Lauri [EMAIL PROTECTED] wrote: What version of MySQL do you have? Depending on that, there are different methods. MySQL 5, can you please show me how to do it.. Did you look at the link David sent you?

SELECT by date plus get both next and last dates with data in it

2005-07-20 Thread me you
Hello, Having some problems trying to get the correct data from MySQL. I need to grab a bunch of information based on a date the user selects (no problem there). However, this is an events type situation, where I want to give people an easy option to move forward or backwards through the

Re: SELECT by date plus get both next and last dates with data in it

2005-07-20 Thread SGreen
event. Any help would be appreciated. Thanks I would do it in 3 queries: set @targetdate='2005-03-01'; /* q1 - determine prev date */ SELECT @prevDate := MAX(datefield) from tablename where user_id= and datefield @targetdate; /* q2 - determine next date */ SELECT @nextDate := MIN

Re: how to select last date by current time?

2004-07-18 Thread Louie Miranda
: Re: how to select last date by current time? To: Louie Miranda [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Louie, Do you want just the most recent date? You could run : SELECT MAX(dateposted) FROM datafiles WHERE office='AC/PA' OR if you want just the most recent record: SELECT dateposted

how to select last date by current time?

2004-07-16 Thread Louie Miranda
List, How can i issue a query that can select last dateposted (FIELD)? My table: - dateposted, format: -MM-DD This is my current sql query which catches in desc order for dateposted and list only 10 sql data. select dateposted, filename, description from datafiles where office = 'AC/PA'

Re: how to select last date by current time?

2004-07-16 Thread Frederic Wenzel
This is my current sql query which catches in desc order for dateposted and list only 10 sql data. select dateposted, filename, description from datafiles where office = 'AC/PA' order by dateposted desc limit 10; This will probably work fine. Anyway, make sure that dateposted has DATE field

Re: how to select last date by current time?

2004-07-16 Thread SGreen
Louie, Do you want just the most recent date? You could run : SELECT MAX(dateposted) FROM datafiles WHERE office='AC/PA' OR if you want just the most recent record: SELECT dateposted, filename FROM datafiles WHERE office='AC/PA' ORDER BY dateposted desc LIMIT 1; OR you could also ask for

Re: SELECT with DATE

2003-02-07 Thread Dobromir Velev
: Wednesday, February 05, 2003 18:18 Subject: SELECT with DATE Can anyone point me in the right direction for finding a method of only creating a query that selects records from a dB where today's date is less than the column 'expire', which is in DATE format. The purpose of this is to automatically

RE: SELECT with DATE

2003-02-07 Thread Victor Pendleton
select columnName from tableName where expireColumnDateValue = Now() -Original Message- From: Stephen of Blank Canvas [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 10:18 AM To: [EMAIL PROTECTED] Subject: SELECT with DATE Can anyone point me in the right direction

SELECT with DATE

2003-02-06 Thread Stephen of Blank Canvas
Can anyone point me in the right direction for finding a method of only creating a query that selects records from a dB where today's date is less than the column 'expire', which is in DATE format. The purpose of this is to automatically stop display special offers. Thanks Stephen

SELECT * WHERE DATE TODAY

2003-01-19 Thread Melissa Stranzl
I am trying to get my program to be searchable by date, but it doesn't work. I get an error message in perl, that follows the code I included. Any suggestions are greatly appreciated. PERL -- @currenttime= localtime(); $y= $currenttime [5] + 1900; $m= $currenttime [4]; $dom=

Re: SELECT * WHERE DATE TODAY

2003-01-19 Thread Paul DuBois
At 15:40 -0800 1/19/03, Melissa Stranzl wrote: I am trying to get my program to be searchable by date, but it doesn't work. I get an error message in perl, that follows the code I included. Any suggestions are greatly appreciated. PERL -- @currenttime= localtime(); $y= $currenttime

select from date

2002-01-28 Thread Jure Grom
I would like to select from table with date field all records from some date, for example today ( i think this is function NOW(). How do i do this? I try : select * from seminar where Datum NOW() Lp jure - Before posting,

Re: select from date

2002-01-28 Thread DL Neil
Jure, I would like to select from table with date field all records from some date, for example today ( i think this is function NOW(). How do i do this? I try : select * from seminar where Datum NOW() The manual has a section on date/time functions and another on date/time data types.

select from date

2002-01-28 Thread Victoria Reznichenko
Jure, Monday, January 28, 2002, 11:58:30 AM, you wrote: JG I would like to select from table with date field all records from some JG date, for example today ( i think this is function NOW(). How do i do JG this? I try : select * from seminar where Datum NOW() You can find description of

Select partial DATE?

2001-04-20 Thread Jason Lam
this? In a nutshell, how do I select some DATE type of data just by year and month match? Thanks Jason Lam

Re: Select partial DATE?

2001-04-20 Thread Paul DuBois
is not, is there a mysql function to do this? In a nutshell, how do I select some DATE type of data just by year and month match? Thanks Jason Lam WHERE YEAR(date) = 2001 AND MONTH(date) = 2 -- Paul DuBois, [EMAIL PROTECTED

how do you select by date?

2001-03-08 Thread Ed Lazor
Hi =) Could you help? I have a table with a datetime field and I'm trying to figure out how to format an SQL query to select records only from within the current month. Any help would be greatly appreciated. Thanks, -Ed

Re: how do you select by date?

2001-03-08 Thread Siim Einfeldt aka Itpunk
.WHERE monthcol=MONTH(now()). I think this should work. Hi =) Could you help? I have a table with a datetime field and I'm trying to figure out how to format an SQL query to select records only from within the current month. Any help would be greatly appreciated. Thanks, -Ed

Re: how do you select by date?

2001-03-08 Thread Ed Lazor
Thanks to everyone who helped so quickly =) Based on what people said, I was able to come up with a solution. The goal was to get a total number of log entries from a given month and year. The query we came up with is: select count(*) as Total from log where month(datestamp) =