JS Time zone function:Set Datename to a Date object created====================Datename.gettimezoneoffset ()--Gets the difference between local time and GMT time (GMT) and returns the value in minutes====================For example: Obtain GMT time
Date functionDate functions manipulate Date values (fields of date type), timestamp values (TIMESTAMP, TIMESTAMP with time ZONE, and TIMESTAMP with the fields of the local time ZONE type), and interval values (INTERVAL day to SECOND and INTERVAL
Internal storage format:
century, year, month, day, hour, minute, second
The default format is: DD-MON-RR.
Sysdate returns the current system time.
SELECT sysdate from DUAL;
The mathematical operation of a date
SELECT (sysdate-hire_date)/7 from
Internal Storage Format:Century, year, month, day, hour, minute, secondThe default format is DD-MON-RR.SYSDATE returns the current system time.Select sysdate from dual;Mathematical operations on datesSELECT (SYSDATE-HIRE_DATE)/7 from tablename where
Definitions and usageThe getTimezoneOffset () method returns the difference in minutes between Greenwich and local time.
GrammarDateobject.gettimezoneoffset () return valueThe time difference between local time and GMT times, in minutes.
In the
Sysdate[Function]: returns the current date. [Parameter]: No parameter, no brackets [Return]: Date [Example] select sysdate hz from dual; return:
Add_months (d1, n1)[Function]: return the new date after the date d1 plus the n1 month. [Parameter]: d1,
Http://www.linuxidc.com/Linux/2010-09/28537.htmThe exchange of date and timestamp under Linux1. Date to timestamp:$ Date-d ' 2009-12-01 23:20 ' +%s 12596808002. Timestamp to date$ Date-d ' 1970-01-01 1259680800 sec UTC ' Tue Dec 1 23:20:00 CST 20093.
Js time zone functions:
Set datename to a created Date object
================================Datename. getTimezoneOffset ()-- Get the difference between the local time and GMT time (Greenwich Mean Time). The return value is in minutes.==============
SysdateFeature: Returns the current date."Parameters": no arguments, no parentheses"Back": Date
2Add_months (D1,N1)"Function": Returns the new date after the date D1, plus N1 months."Parameters": D1, Date type, N1 digital type"Back": Date
In the development process, there are two concepts related to the regional area: character encoding and time; the evolution of the Code and Time specification has a historical legacy, and it is a corner of the development of software. About
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.