MySQL - Obtener mm de datetime

 
Vista:

Obtener mm de datetime

Publicado por juanma (3 intervenciones) el 30/04/2003 12:48:06
Mi problema es el siguiente: quiero obtener el mes en formato mm o cualquier otro formato, de una fecha de tipo datetime, como lo hago?

Gracias por anticipado
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Obtener mm de datetime

Publicado por Fernando (8 intervenciones) el 30/04/2003 15:55:19
Hola

MONTH(date)
Returns the month for date, in the range 1 to 12:
mysql> select MONTH('1998-02-03');
-> 2

MONTHNAME(date)
Returns the name of the month for date:
mysql> select MONTHNAME("1998-02-05");
-> 'February'
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar