Keywords: Oracle numeric function-type date conversion To_char automatic type conversion Date type numeric converter other function numeric functionABS: Find the absolute value function, such as: ABS (−5) 5SQRT: square root function, such as: sqrt (2) 1.41421356Power: expone
format(2) available from Oracle 9i the timestamp type is a valid extension of the date type, providing greater time accuracy, support for nine-bit children, and the ability to store time zone information(3) Starting with the Oracle 9i interval type, which supports the storage time difference and can be used with date
The following articles mainly introduce the actual application of Oracle to obtain the system date and date conversion functions, as well as how to correctly obtain the system date: SYSDATE (), and format the date: TO_CHAR (SYSDAT
Tags: format conversion databases div data blog charstylecreatepre // data for query date (type date) select * From where to _char (Create_date, " yyyy-mm-dd hh:mi:ss " Span style= "COLOR: #ff0000" ">" ) = "
Span style= "COLOR: #ff0000" >2013-08-12 05:31:09 " select to_char (create_date, " yyyy-mm-dd hh:mi:ss " ) from auth_organization_t t
In Oracle, the input value of the date conversion report is insufficient for the Date Format Length.
In Oracle, the input value of the date conversion report is insufficient for the
Tags: number date type first day get conversion SQL name includes divThis 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 months. To
"The input value is not long enough in the date format" reported in Oracle for date conversion"
Select (select j. jgmc from t_zzjg j where j. jtpd = t. jtpd) jgmc,T. jtpd,Sum (t. jcj) jcj,Sum (t. sa) sa,Sum (t. la) la,Sum (t. ajbl) ajbl,Sum (t. xsqzcs) xsqzcs,Sum (t. sacw) sacw,Sum (t. jgzx) jgzx,Sum (t. zfgz) zfgz,Sum
TO_DATE format (take time: 13:45:25 as an example)
1. Date and character conversion function usage (to_date, to_char)
Copy codeThe Code is as follows:Select to_char (sysdate, 'yyyy-mm-dd hh24: mi: ss') as nowTime from dual; // convert the date to a stringSelect to_char (sysdate, 'yyyy') as nowYear from dual; // obtain the year of the timeSelect to_char (sysdate,
Oracle to_char date conversion string statement sharing, oracleto_char
1 is displayed in 12-hour format
SQL> select to_char (sysdate, 'yyyy-MM-DD HH12: MI: SS am') from dual;TO_CHAR (SYSDATE, 'yyyy-MM-DDHH1------------------------------02:50:06 pm
2 In 24-hour format
SQL> select to_char (sysdate, 'yyyy-MM-DD HH24: MI: SS am') from dual;TO_CHAR (SYSDATE, 'yyyy-MM-
To_date format (in time: 2007-11-02 13:45:25 for example)
1. Date and character conversion function usage (TO_DATE,TO_CHAR)
Copy Code code as follows:
Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') as nowtime from dual; Convert Date to String
Select To_char (sysdate, ' yyyy ') as nowyear from dual; Get the year of time
Select To_char (s
To_date () is the Oracle date conversion function. You can convert the character type to the date type in a certain format. Let's take a look at the syntax of the Oracle date conversion
Select To_char (sysdate+1, ' Yyyy-mm-dd ') from dual;To_char (sysdate+1, ' yyyy-mm-dd ')------------------------------
Query the first six months of the current time
Select Add_months (sysdate,-6) from dual
1. Conversion function
The biggest relationship with date operations is two conversion functions: To_date (), To_char ()The to_date () action converts a
Description: returns the logarithm of the base-m value n. (M> 1, n> 0) Examples: Select log (6, 3) "test" from dual; 1.17, MOD (m, n) Function Description: returns the remainder after M/N. If n = 0, returns M (modulo operation) Examples: Select Mod (6, 3) "test" from dual; 1.18, power (m, n) Function Description: returns n Ming examples of M: Select power (6, 3) "test" from dual; 1.19, round (n, [m]) Function Description: execute the rounding operation. m can be omitted. When M is omitted, It i
information technology Select Replace (deptno, ' 01 ', ' information technology ') from users;
Use the Age field in the Employee Information table with 10 to select mod (age,10) from users;
Year of entry of employee: Select Extract (from RegDate) from users;
Find employee information for May entry select * from Users where extract (month from regdate) = 5; Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Numerical functions, chara
Tags: interval to_date Mutual conversion Note span difference Time type SQL HTTPSource: http://www.cnblogs.com/java-class/p/4742740.html the difference between date and timestamp The date type is an Oracle-commonly used datetime variable, and his time interval is seconds. Two date
Oracle Date Conversion
Conversion functions
The biggest relationship with date operations is two conversion functions: To_date (), To_char ()
The to_date () action converts a character type to a
Tags: string ora size format font Oracle date col functionThe most significant relationship with the date operation is two conversion functions: To_date (), To_char ()The To_date () function converts a character type to a date type in a certain format:Specific usage: to_date
Select To_date (' 2010-10-20 13:23:44 ', ' yyyy-mm-dd hh24:mi:ss ') DateTime from dual;Display results: 2010/10/20 13:23:44 Select To_date (' 2010-10-20 13:23:44 ', ' yyyy/mm/dd hh24:mi:ss ') DateTime from dual; Display results: 2010/10/20 13:23:44 Select To_char (to_date (222, ' J '), ' JSP ') from dual; Displaying results: Hundred Twenty-two If you follow the example below, you will get an error: ORA-01849: The hour value must be between 1 and 12. (Because the HH is 12 binary, no 13 error) S
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.