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')
In Java, System.currenttimemillis () takes the number of milliseconds from 1970-01-01 00:00:00.000 to the current time, a long value.This value is now accessed in a table in the Oracle database and needs to be converted to a readable date
Town Field Poem:——— Dream who feel, the water month Build blog. Baiqian tribulation, only know the vicissitudes of the world.——— today holds the Buddhist language, the technology is boundless willing to learn. Willing to do what you learn, cast a
1. Use the CTime class (get system current time, accurate to seconds)CString str; // Get system Time CTime tm;tm=ctime::getcurrenttime (); // Gets the system date Str=tm. Format (" now time is%y year%m month%d day%x"); MessageBox (STR,NULL,MB_OK);A,
There are four ways to convert time to milliseconds:Date.parse ()Date.utcValueOf ()GetTime ()1. Date.parse (): The method accepts a string argument that represents a date, and then tries to return the number of milliseconds for the date based on
This is the SQL script that calculates the first day of the one month:SELECT DATEADD (mm, DATEDIFF (Mm,0,getdate ()), 0)--the first day of the monthSELECT DATEADD (mm, DATEDIFF (Mm,0,getdate ())-1, 0)-the first day of the monthSELECT DATEADD
The unit of time can be from very small to great, the following description is to convey a feeling of a large time span.A second (One-zero seconds of One-zero)The scientists timed the instantaneous events with a few seconds.Researchers have used
VC ++ obtains the system time and program running time (precise to seconds and milliseconds ).
1. Use the CTime class (get the current system time, accurate to seconds)CString str; // obtain the system time CTime tm; tm = CTime: GetCurrentTime (); //
Obtain time information in NSDate, in years, months, weeks, days, hours, minutes, seconds, and milliseconds:
Note: The first method cannot obtain information in milliseconds, and the second method is used to obtain information in milliseconds.
[Cpp]
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.