[Go to] obtain the first day of the current week, month, and quarter in MySQL on the last day. The last day of the current week, month, and quarter in MySQL is taken from: hideto. javaeye. comblog255816 the first day of the current week:
Php + js + mysql-like webQQ-& amp; lt; 3 & amp; gt; month days change with month. During registration, the number of days of the month changes with the change of the month. this small function is used in many places! The number of days in May
MySQL queries a lot of ways, the following for you to introduce the MySQL query is to query this week, last week, this month, the last month's data, if you are interested in MySQL query, may wish to see.Query the current data todaySELECT
Mysql queries data from the current day, this week, this month, and the previous month.
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
Select date_sub (now (), interval 1 month) current time of last month today select unix_timestamp (date_sub (now (), interval 1 month) current time of last month today (timestamp) select date_sub (date_format (now (), '% Y-% m-% d 08:00:00'),
Mysql obtains the first day of the quarter, the first day of the month, and the first day of the week.
On the first day of this quarter, you can convert the string to the date. There are many methods, including aliases (synonyms) of the same
Thank you: http://www.111cn.net/database/110/d45124323da8d2d87b80f78319987eda.htmView another blog on the same topic: http://blog.csdn.net/cleanfield/article/details/41447585----------------------------------------------------------------------------
No. 13th, draft 12th, will be updated tomorrow, too busy recently.Customer retention is a measure of customer value often used to reflect the level of customer activity, in the Internet enterprises, especially now mobile phone traffic has exceeded
MySQL database gets system time, year, month, day single fetchGet current system date Time: Select Sysdate () as System datetime;Get current system Month Day: Select Current_date as Month day;Gets the current system year: Select Year (current_date)
I. Annual ENQUIRY Enquiry data for the yearSELECT * fromblog_articleWHERE Year(From_unixtime (Blogcreatetime))= Year(Curdate ()) Second, query quarterly data query data with quarter numberSELECTArticleID, Quarter (from_unixtime (' Blogcreatetime ')
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.