TEMA

Runtime Error

Eliezer Cardoso Alves preguntado 1 year ago

Que há de errado aqui?

SELECT name, CAST(DATE_FORMAT(payday, "%d") AS INTEGER) as day FROM loan

Recuerda no enviar soluciones. Tu mensaje puede ser revisado por nuestros moderadores.

  • Higor Costa respondido 1 year ago

    The right way to extract the day from a date and convert it to int, it is as follow:

    CAST( EXTRACT (DAY FROM payday) AS INT  ) AS day