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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With