Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/06/2007, 12:47
Avatar de claudiovega
claudiovega
 
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 6 meses
Puntos: 11
Re: operaciones con fechas en mysql

Cotizaciones de un dia:

select * from cotizaciones where fecha=now();
select * from cotizaciones where fecha='2007-06-10';

Cotizaciones de un mes:

select * from cotizaciones where month(fecha)=6 and year(fecha)=2007

Cotizaciones de un año:

select * from cotizaciones where year(fecha)=2005