Oracle Syntax:Interval 'integer [-integer] '{year | month} [(precision)] [{Year | month}]This data type is often used to indicate a time difference. Note that the time difference is accurate only to the year and month. Precision is the
Date interval: year, month, day, hour, minute, second, interval: Year
Create a test table:
Create or replace view v ASSELECT TO_DATE ('1970-1-1 13:14:15 ', 'yyyy-MM-DD HH24: MI: ss') AS c from dual; SELECT * FROM v;
Subtract two dates to get
NTERVALYEARTOMONTH Oracle Syntax: INTERVALinteger [-integer] {YEAR | MONTH} [(precision)] [TO {YEAR | MONTH}] This data type is often used TO indicate a time difference, note that the time difference is accurate only to the year and month. precision
Original: date interval of the year, month, day, time, minute, secondTo create a test table:CREATE OR REPLACE VIEW v asselect to_date (' 2015-1-1 13:14:15 ', ' yyyy-mm-dd HH24:MI:SS ') as C from DUAL; SELECT * from V;Two date subtraction, get the
To create a test table:CREATE OR REPLACE VIEW v asselect to_date (' 2015-1-1 13:14:15 ', ' yyyy-mm-dd HH24:MI:SS ') as C from DUAL; SELECT * from V;Two date subtraction, get the number of days, multiplied by 24 is the hour, and so on, you can
JS Get Current date time + date validation + judgment leap Year + date difference + date formatting +js Judging How many days a certain monthString to date type +js current datetime + date validation + judgment leap Year + date difference + date
DateDiff (Week,zy_time,getdate ()) =0//query this weekDateDiff (Month,zy_time,getdate ()) =0//enquire this monthThis season: SELECT * from table where DATEDIFF (Qq,c_calltime,getdate ()) =0First half year 1-6, after half year 7-12:select * from
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
The time control only displays the year and month, and the time control displays the year and month.
Initialize and load the db tag.
$ (Function () {$ ('# db '). datebox ({onShowPanel: function () {// displays the selected object and then
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.