1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Extract Month, Year (Netezza SQL)

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 17, 2024 às 07:32.

  1. Stack

    Stack Membro Participativo

    My data type is a date formatted as YYYY-MON-DD

    I would like to extract the month and year to be formatted as MON YYYY while keeping the data type as date so that I will be able to use it with the ADD_MONTHS function.

    Is there a way to do so? I extract the date from the data field called date_process.

    This is what I thought of but it doesnt seem to be working.

    SELECT TO_DATE(TO_CHAR(PROCESS_DATE,'YYYY-MON'), 'MON YYYY') AS PERIOD,


    Thank you.

    Continue reading...

Compartilhe esta Página