Re: DATE Manipulation

2004-01-22 Thread Vinay
this could help http://www.mysql.com/doc/en/Date_and_time_functions.html V!nay Chris W wrote: > Andy Prasetya wrote: > > > Hello, > > > > I'm a newbie in MySQL. I have a table that contains column 'startdate > > [date]' and 'enddate [date]'. Somehow, I have to execute SQL that > > search an

Re: DATE Manipulation

2004-01-22 Thread Chris W
Andy Prasetya wrote: Hello, I'm a newbie in MySQL. I have a table that contains column 'startdate [date]' and 'enddate [date]'. Somehow, I have to execute SQL that search any entry that corresponds to the current year and current month, e.g.: "SELECT * FROM mytable WHERE fieldx = '123' AND (s

Re: Date Manipulation

2002-02-26 Thread Stewart G.
Aravind, MySQL stores all dates as -MM-DD, if you must use MM/DD/ then you can store it as a string. The best method would be to let MySQL store the date as -MM-DD and use: select date_format(mydate, '%m/%d/%Y'); That will return mydate as "MM/DD/". =S. On Tue, 26 Feb 2002

RE: Date Manipulation

2002-02-26 Thread Al Caponi
AFAIK, you'll have to do the conversion before inserting the date into the database because MySQL does not support the MMDD format. Regards, Al > -Original Message- > From: S Aravind [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 26, 2002 5:12 PM > To: [EMAIL PROTECTED] > Subje

Re: Date Manipulation.

2001-11-27 Thread Julio Faerman
HI ! First of all , thnx a lot for the attention. The EXACT query i need is . assume IN and OUT as date colums in the format "-MM-DD HH:MM:SS " I need my query to return: "How many seconds are there between IN and OUT but outside the period 8:00 to 20:00" For example : IN ="2001-10-20 02:30:0

Re: Date Manipulation.

2001-11-27 Thread Thomas Spahni
On Mon, 26 Nov 2001, Julio Faerman wrote: > Is there anything like a "to_hours()" function ? > I need my query to to calculate how much time there is between two time > values Julio, ok, we are trying to help you, but please make our lives a little bit easier and tell us exactly what you

Re: Date Manipulation.

2001-11-26 Thread sherzodR
Well, to do date calculations, use DATE_SUB() and DATE_ADD() functions. To convert to some other functions, use DATE_FORMAT() function. For templates that DATE_FORMAT() needs, please refer to documentation. There're bunch of'em -- sherzodR On Mon, 26 Nov 2001, Thomas Spahni wrote: >On Mon,

Re: Date Manipulation.

2001-11-26 Thread Thomas Spahni
On Mon, 26 Nov 2001, Julio Faerman wrote: > Is there anything like a "to_hours()" function ? > I need my query to to calculate how much time there is between two time > values Julio, have a look at the UNIX_TIMESTAMP(date) and FROM_UNIXTIME(unix_timestamp) functions. These allow to conver

Re: Date Manipulation.

2001-11-26 Thread Julio Faerman
Is there anything like a "to_hours()" function ? I need my query to to calculate how much time there is between two time values - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://

Re: Date manipulation question .

2001-11-26 Thread sherzodR
Check out DATE_SUB() and DATE_ADD() functions. Those are the one to do the trick. sherzodR On Mon, 26 Nov 2001, Julio Faerman wrote: >Hi ! >I have a table with 2 coluns with time values , for example, colum START >("2001-11-20 23:34:03" , for example) and STOP ("2001-11-21 08:34:03" , for >e