how can i select only the records from DB where the Data (Date in portuguese) = the current date
SELECT id, data, dia, mes, ano,fornecedor, doc, valor_líquido, total
FROM public.fluxo_pagamentos where data = current_date;
how can i select only the records from DB where the Data (Date in portuguese) = the current date
SELECT id, data, dia, mes, ano,fornecedor, doc, valor_líquido, total
FROM public.fluxo_pagamentos where data = current_date;
cast to date and use now()
SELECT id, data, dia, mes, ano,fornecedor, doc, valor_líquido, total
FROM public.fluxo_pagamentos where data::date = now()::date;
I may suspect that data has a time component. If so, try:
where data >= current_date::timestamp and
data < current_date::timestamp + interval '1 day'