List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:July 3 2003 9:39am
Subject:Re: possible query #2
View as plain text  
Fabrizio Tivano <fabrizio@stripped> wrote:
> 
> on MySQL 3.23.54
> i have a table that list the number of  user-time days like:  35 
> 
> whell....based on curdate() function 
> 
> can i able to make a select wich display  the sum (150-35)
> where 150 is date_format(curdate(), '%j')
> in a format like (%d/%m/%y) ?
> 
> this kind of query is possible? 
> ...if yes how?

Sorry, but your explanation is not clear enough for me. You can't apply arithmetic
operation directly on DATE columns, take a look at TO_DAYS() and FROM_DAYS() functions:
	http://www.mysql.com/doc/en/Date_and_time_functions.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




Thread
possible query #2Fabrizio Tivano2 Jul
  • Re: possible query #2Victoria Reznichenko3 Jul