Transfer from http://hi.baidu.com/juanjuan_66/blog/item/cf48554c9331fbe6d62afc6a.htmlOracle Date Subtraction2012-02-10 12:18--months_between (DATE2,DATE1)Give the month of date2-date1Sql> Select Months_between (' 1 September-December-1999 ', ' 1
Oracle partition, index, test (1) ----- insert only this time. See how to insert Fast Preparation
SQL code -- data file alter system set db_create_file_dest = 'd: \ toby \ oracle \ data; -- tablespace create tablespace ts_sales_200901 datafile size 5
Select date, optional field 1, optional field 2, sum (type 1) Type 1, sum (Type 2) Type 2, sum (Type 3) Type 3, sum (Type 4) type 4, sum (type 5) type 5, sum (Type 6) type 6 from (selectto_date (to_char (date, yyyy-mm-dd), yyyy-mm-dd) date, optional
Oracle Profiling Functions Overview
Profiling functions in Oracle are similar to aggregate functions, but for each set of records, no matter how many rows, the aggregate function returns only one row of values, and the parse function returns a
To_date format (in time: 2007-11-02 13:45:25 for example)
Year:
YY two digits two-digit year display value: 07
YYY three digits three-digit year display value: 007
YYYY four digits four-digit year display value: 2007
Month:
MM number two-bit month
--View the amount of data generated per day for archived logsSource: http://blog.51cto.com/bjiokn/321878Alter session set nls_date_format= ' Yyyy.mm.dd hh24:mi:ss ';Select Trunc (completion_time) as Arc_date,COUNT (*) as Count,Round ((SUM (blocks *
To_date format (in time: 2007-11-02 13:45:25 for example)
Year:YY two digits two-digit year display value: 07YYY three digits three-digit year display value: 007YYYY four digits four-digit year display value: 2007
Month:MM number two-bit month
In common system development, we often encounter similar report statistics function requirements.
In common system development, we often encounter similar report statistics function requirements.
Generally, a value is counted by date range. Each
Generally, a value is counted by date range. Each column is the classification of statistics. For example:
The following example shows how to write an SQL statement: (Note: statistics are calculated based on the "date" field)
Copy codeThe Code is
Select date, optional field 1, 2,sum (Type 1) type 1,sum (Type 2) type 2,sum (Type 3) type 3,sum (Type 4) type 4,sum (Type 5) type 5,sum (type 6) type 6 from (Select To_date (to_char (date, ' Yyyy-mm-dd '), ' yyyy-mm-dd ') date, optional field 1,
Establish an Instance data table to create an order form myorder1111Table Sub-segment:ID number Primary key (value cannot be heavy, cannot be empty) name varchar2 (in) Money numberodate DateInserting data into a table1, ' jd0001 ', 123.45,
This article focuses on the detailed usage examples of to_date in Oracle, including the use of period and character conversion functions, string and time conversions, the day of the week, the number of days between two dates, and the use of
Scenario: Encountered 100 million data volume data needs to do some statistical analysis according to the user name, want to do some aggregation calculation is basically not possible, so the intention is to create a partition according to the date
ORACLE converts data between milliseconds and dates, and oracle converts data between milliseconds.
Convert millisecond to date
SELECT TO_CHAR(1406538765000 / (1000 * 60 * 60 * 24) + TO_DATE('1970-01-01 08:00:00', 'YYYY-MM-DD HH:MI:SS')
Let's talk about the javascript Date type and javascriptdate.
1. Create a new date object. If no parameter is included, the object automatically obtains the current date and time.
var d = new Date()
2 If you need to specify a specific Date, you can
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.