Get the App
SLTechnology News&Howtos  ›  Database  › 

MYSQL multiple methods for querying time data

Shulou Source: shulou.com Published: 2022-06-01 19:43:55 10月01日 Update

This article mainly gives you a brief talk about MYSQL a variety of query time data methods, related technical terms you can check online or find some related books to supplement, here is not involved, we will go straight to the topic, I hope MYSQL a variety of query time data methods This article can bring you some practical help.

mysql query this quarter

today

select * from table name where to_days(time field name) = to_days(now());

yesterday

SELECT *FROM TABLE NAME WHERE TO_DAYS( NOW( ) ) - TO_DAYS(TIME FIELD NAME)

Tags: Queries data time fields multiple methods quarters specialties industries expertise topics books content actual news months terms sections knowledge articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Docker Linux macOS