The code is as follows
Copy Code
//---------------------------------------------------Judging leap years//---------------------------------------------------Date.prototype.isLeapYear = function (){Return (0==this.getyear ()%4&& (This.
1 "in 12-hour system display
Sql>select to_char (sysdate, ' yyyy-mm-dd HH12:MI:SS AM ') from dual;To_char (sysdate, ' YYYY-MM-DDHH1------------------------------2007-06-29 02:50:06 pm
2 "in 24-hour system display
Sql> Select To_char (sysdate, '
Format Date String-->Date or Data-->StringSimpleDateFormat sdf = new SimpleDateFormat ("Yyyy-mm-dd"); date date = sdf.parse ("2009-11-04");// String-->date string sdate = sdf.format (Date );// Data-- >String ==============================
The following summarizes the implementation methods for obtaining a specified date in Java. For more information, seeCopy codeThe Code is as follows:Format a Date String --> Date or Data --> String
SimpleDateFormat sdf = new SimpleDateFormat
Java get millisecond: system. currenttimemillis () Java get nanosecond: system. nanotime () (used to get very accurate time, recommended !) Java obtains the current date: gregoriancalendar date_1 = (gregoriancalendar) calendar. getinstance (); Java.
1. Cause of Error:The date type cannot contain precision after seconds.As Date: 2010-01-01 20:02:20.0Workaround: Remove the precision after the date seconds, To_date (substr (invoice_date,1,10), ' Yyyy-mm-dd ')If Date: 2010-01-01 20:02:202. INSERT
1 ADD_MONTHS
Format:ADD_MONTHS (D, N)
Note:Returns the date and time corresponding to date and time D plus N months. If N is the timing value, it indicates that D is followed; if N is negative, it indicates that D is before; if N is the decimal
Source time: to_char (datevalue ));Source time minus 1 day: to_char (DateValue-1 ));Source time minus 1 day 1 hour: to_char (DateValue-1-1/24 ));Source time minus 1 day 1 hour 1 minute: to_char (DateValue-1-1/24-1/(24*60 )));Source time minus 1 day 1
Format Date string-->date or data-->stringSimpleDateFormat SDF = new SimpleDateFormat ("Yyyy-mm-dd");Date date = Sdf.parse ("2009-11-04");//string-->dateString sdate = Sdf.format (date);//Data-->string ================================================
Date and Time class development experience 1 Revision History
Version
Change Time
Author
Description
Effort Hours
1.0
2006-4-28
Levinsoft
methods, resources, etc.
1
1.1
2007-8-2
There are several scanning methods under Oracle 10g, note that the last scan method will not be partitioned when the columns of the partition are computed. This is the same as evaluating an indexed column, which results in an unusable index.--Scan
--(Take the system time as an example, the actual situation can be replaced)1 Read system time –sysdateSelect sysdate from dual;2 Read time information (year, month, day, hour, minute, second)Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') as
Example of mutual conversion between ORACLE milliseconds and dates, and oracle mutual conversion
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'), 'YYYY-MM-DD HH2
I. Note: Some tables in the OLTP database have a large amount of data and a large amount of data is continuously increased every month. Because historical data is not accessed in this database, it is analyzed in another OLAP database, therefore,
Generally speaking, Exp/imp is the previous generation export importer, EXPDP/IMPDP is a new generation of export importer program. For large data volume Export import preferred EXPDP/IMPDP, you can use the degree of parallelism, the table space and
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.