As shown below: Yesterday: UNIX_TIMESTAMP(CAST(SYSDATE() AS DATE) - INTERVAL 1 DAY) Today: UNIX_TIMESTAMP(CAST(SYSDATE() AS DATE)) To query today's records, you only need to have a timestamp whose creation time is greater than or equal to 0:00 today (only when there is no creation time greater than today). Yesterday's records are greater than or equal to 0:00 yesterday and less than 0:00 today. The above example of how to get the 0:00 timestamp of today and yesterday in MySQL is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use ss command instead of netstat in Linux operation and maintenance
>>: Nginx's practical method for solving cross-domain problems
I used js to create a package for converting Chin...
1.watch listener Introducing watch import { ref, ...
What is a Viewport Mobile browsers place web pages...
1. Check the firewall status Check the firewall s...
This article example shares the specific code of ...
1. What is event delegation? Event delegation: Ut...
Preface: When we want to clear a table, we often ...
The backend uses the thinkphp3.2.3 framework. If ...
Install the latest stable version of MySQL on Lin...
Table of contents 1:mysql execution process 1.1: ...
Table of contents Technology Stack Effect analyze...
Table of contents Business scenario: Effect demon...
Table of contents 1. Introduction to MySQL Index ...
1.Tomcat Optimization Configuration (1) Change To...
Table of contents Three steps to operate the data...