Date.prototype.Format date formatting Date.prototype.DateAdd Date Calculation Date.prototype.DateDiff Comparison date difference Date.prototype.toString date to string Date.prototype.toArray The date is split into an array Date.prototype.DatePart partial information for the date Date.prototype.MaxDayOfDate the maximum number of days in the month in which the date is taken Date.prototype.WeekNumOfYear Determine the week ordinal of the year stringtodate string to date type Isvaliddate validation
arraysDate.prototype.DatePart Partial information of the date takenDate.prototype.MaxDayOfDate the maximum number of days in the month in which the date is takenDate.prototype.WeekNumOfYear the week of the year in which the date is judgedStringtodate String to date typeIsvaliddate Verifying date ValidityCheckdatetime Full date and time checkDaysbetween Date Days DifferenceJS Code://---------------------------------------------------Judging leap years//-------------------------------------------
));}//---------------------------------------------------Date formattingFormat Yyyy/yyyy/yy/yy represents the yearMm/m MonthW/W Weekdd/dd/d/d Datehh/hh/h/h timemm/m minSS/SS/S/S sec//---------------------------------------------------Date.prototype.Format = function (FORMATSTR){var str = FORMATSTR;var Week = [' Day ', ' one ', ' two ', ' three ', ' four ', ' five ', ' six '];Str=str.replace (/
Date.prototype.isLeapYear Judge Leap Year
Date.prototype.Format Date format
DATE.PROTOTYPE.DATEADD Date Calculation
Date.prototype.DateDiff Comparison Date Difference
Date.prototype.toString Date-turn string
Date.prototype.toArray date split into arrays
Date.prototype.DatePart some information about the date
Date.prototype.MaxDayOfDate the maximum number of days of the month from which the date is taken
Date.prototype.WeekNumOfYear the first weeks of the year in which the date is judged
Stringto
Date.prototype.MaxDayOfDate the maximum number of days of the month from which the date is taken
Date.prototype.WeekNumOfYear the first weeks of the year in which the date is judged
Stringtodate String Turn Date type
Isvaliddate Validation Date Validity
Checkdatetime Full Date Time check
Daysbetween Date Days Bad
Copy Code code as follows:
//---------------------------------------------------
Judging leap years
//---------------------------------------------------
Date.prototype
Tags: like measure multiple material war--shares left join decode/*dialect*/With Tab1 as (SELECT DISTINCTEntry. Fmanubillid Manuorderid,SUM (entry.fqty) qty--quantity of goods in storageFrom T_im_manufacturerecbill BillINNER JOIN T_im_manufacturerecbillentry entry on entry.fparentid = Bill.fidINNER JOIN T_scm_transactiontype transtype on transtype.fid = Bill.ftransactiontypeidINNER JOIN T_org_storage tos on tos.fid = Bill. FstorageorgunitidINNER JOIN T_mm_manufactureorder TMM on TMM. Fmaterialid
the year =datename (week, ' 2004-10-15 ')
, today is the week =datename (weekday, ' 2004-10-15 ')
function parameters/Functions
GetDate () returns the current date and time of the system
DateDiff (INTERVAL,DATE1,DATE2) returns the difference between Date2 and date1 two dates, as specified by interval
Date2-date1
DATEADD (interval,number,date) in the manner specified by interval, plus the date after number
DatePart (interval,date) returns the integer value of the specified part of the dat
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 field 1, optional field 2, count (primary key field) select date, optional field 1, optional field 2, sum (type 1) Type 1, sum (Type 2) type 2, sum (Type 3) Typ
arraysDate.prototype.DatePart Partial information of the date takenDate.prototype.MaxDayOfDate the maximum number of days in the month in which the date is takenDate.prototype.WeekNumOfYear the week of the year in which the date is judgedStringtodate String to date typeIsvaliddate Verifying date ValidityCheckdatetime Full date and time checkDaysbetween Date Days DifferenceJS Code://---------------------------------------------------Judging leap years//-------------------------------------------
FormattingDATE.PROTOTYPE.DATEADD Date CalculationDate.prototype.DateDiff Comparison Date DifferenceDate.prototype.toString Date to StringDate.prototype.toArray date split into arraysDate.prototype.DatePart Partial information of the date takenDate.prototype.MaxDayOfDate the maximum number of days in the month in which the date is takenDate.prototype.WeekNumOfYear the week of the year in which the date is judgedStringtodate String to date typeIsvaliddate Verifying date ValidityCheckdatetime Full
arraysDate.prototype.DatePart Partial information of the date takenDate.prototype.MaxDayOfDate the maximum of the month in which the date is takenDate.prototype.WeekNumOfYear the week of the year in which the date is judgedStringtodate String to date typeIsvaliddate Verifying date ValidityCheckdatetime Full date and time checkDaysbetween Date Days DifferenceJS Code://---------------------------------------------------Judging leap years//---------------------------------------------------Date.pr
Date.prototype.isLeapYear Judge Leap Year
Date.prototype.Format Date format
DATE.PROTOTYPE.DATEADD Date Calculation
Date.prototype.DateDiff Comparison Date Difference
Date.prototype.toString Date-turn string
Date.prototype.toArray date split into arrays
Date.prototype.DatePart some information about the date
Date.prototype.MaxDayOfDate the maximum number of days of the month from which the date is taken
Date.prototype.WeekNumOfYear the first weeks of the year in which the date is judged
String
information about the date
Date.prototype.MaxDayOfDate the maximum number of days of the month from which the date is taken
Date.prototype.WeekNumOfYear the first weeks of the year in which the date is judged
Stringtodate String Turn Date type
Isvaliddate Validation Date Validity
Checkdatetime Full Date Time check
Daysbetween Date Days Bad
JS Code:
//---------------------------------------------------
Judging leap years
//---------------------------------------------------
Date.prototype.is
listDate.prototype.isLeapYear Judge Leap YearDate.prototype.Format Date formatDATE.PROTOTYPE.DATEADD Date CalculationDate.prototype.DateDiff Comparison Date DifferenceDate.prototype.toString Date-turn stringDate.prototype.toArray date split into arraysDate.prototype.DatePart some information about the dateDate.prototype.MaxDayOfDate the maximum number of days of the month from which the date is takenDate.prototype.WeekNumOfYear the first weeks of the year in which the date is judgedStringtodate
));
}
//---------------------------------------------------//Date format //Format yyyy/yyyy/yy/yy = year //mm/m Month W/W Week //dd/dd/d/d date //hh/hh/h/h time //mm/m minutes //ss/ss/s/s sec //-------------------------------- -------------------
Date.prototype.Format = function (formatstr) {var str = formatstr; var Week = [' Day ', ' one ', ' two ', ' three ', ' four ', ' five ', ' six ']; str
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.