How to Get Yesterday’s Date in SQLite Database: SQLite Operators: DATE() Problem: You would like to display yesterday's date (without time) in an SQLite database. Solution 1: SELECT DATE('now','-1 day') AS yesterday_date; Assuming today is 2020-09-24, the result is: yesterday_date 2020-09-23 Discussion: To get yesterday's date, you need to subtract one day from today. Use now() to get today's date. In SQLite, you can subtract or add any number of days, months, etc., using the DATE() function. Here, since you need to subtract one day, you use DATE('now','-1 day') to get yesterday’s date. You can go back by any time interval just as easily. As an example, here is how you would go back by five months and three days. SELECT DATE('now', '-5 months', '-3 days') AS modified_date; You can also calculate tomorrow's date. To do so, you need to add one day. SELECT DATE('now', '+1 day') AS tomorrow_date; Recommended courses: SQL Basics in PostgreSQL Revenue Trend Analysis in SQL SQL Practice Set Recommended articles: Performing Calculations on Date- and Time-Related Values How to Analyze Time Series COVID-19 Data with SQL Window Functions Get to Know the Power of SQL Recursive Queries See also: How to Add a Month to a Date in SQLite How to Get the Current Time in SQLite How to Get the Current Date in SQLite How to Format a Datetime in SQLite Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query