Skip to content
Advertisement

How to insert today’s date in SQL select statement using python?

I’m trying to send today variable into SQL but it is not working.

JavaScript

Advertisement

Answer

You don’t have to compute today’s date in Python. Just use the PostgreSQL function CURRENT_DATE:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement