// File name: Date. Inc. php3
// Before using these two functions, convert the date or date to the timestamp type.
// For example:
// $ Today = mktime (0, 0, 0, date ("M"), date ("D"), date ("Y "));
/***** simulate the dateadd function ******* in sqlserver $ part type: String value range: year, month, day, hour, Min, SEC indicates the part of the date to be added. $ N type: value indicates the number of days to be added, determine which part t
DateAdd function:
Copy codeCode: function DateAdd (interval, number, date ){
Switch (interval. toLowerCase ()){
Case "y": return new Date (date. setFullYear (date. getFullYear () + number ));
Case "m": return new Date (date. setMonth (date. getMonth () + number ));
Case "d": return new Date (date. setDate (date. getDate () + number ));
Case "w": return new Date (date. setDate (date. getDate () + 7 * number
Returns the newDatetimeValue. Syntax
Dateadd( Datepart, Number, Date) Parameters
Datepart
Is a parameter that specifies which part of the date should be returned to the new value. The following table lists the dates and abbreviations recognized by Microsoft SQL Server.
Date
Abbreviations
Year
YY, yyyy
Quarter
QQ, Q
Month
Mm, m
Dayofyear
Dy, y
Day
DD
FileName: date.inc.php3
Before you use these two functions, you must first convert the date or datetime to the timestamp type.
Such as:
$today =mktime (0,0,0,date ("M"), Date ("D"), Date ("Y"));
/**** simulate the DATEADD function in SQL Server *******
$part Type: string
Value range: year,month,day,hour,min,sec
Which part of the date to increase
$n Type: Numeric value
said: To increase how much, according to $part decide which part to add
Can be a ne
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 conscience blog.——————————————————————————————————————————1 Code1 Select getdate ()2Selectdateadd(year,5,getdate())2 Show——————————————————————————————————————————The essence of the blog, in the technical part, more in the town yard a poem.Sqlsever is a
--getdate Current system date, timeSelect getdate()--2014-11-24 13:22:40.407--the CONVERT () function can display date/time data in different formatsSelect Convert(varchar( -),getdate(), at)--2014-11-24--DateDiff Returns the number of date and time boundaries across two specified datesSelect DateDiff( Day,'2014-11-24','2014-12-28')-- theSelect DateDiff(Month,'2014-11-24','2014-12-28')--1--datepart Returns an integer representing the specified date part of a specified dateSelect DatePart(Month,'2
value of this option is in the century before the end of the century. For example, if two digit year cutoff is 2049 (default), 49 is interpreted as 2049,2050 as 1950. To avoid blurring, use a four-digit year.Return typeReturn datetime, but if the date parameter is smalldatetime, return smalldatetime.ExampleThis example prints a list of the title time structures in the pubs database. This time structure indicates the current release date plus 21 days.Use pubsGoSelect
)-math.floor (t/1000);
return I[interval];
}
DateAdd Method
Returns the Date object for which the specified time interval has been added.
Dateobj.dateadd (interval, number)
Parameters
Dateobj
Required option. Any Date object.
Interval
Required option. A string expression that represents the time interval to add. For numeric values, see the "Settings" section.
Number
Required option. Numeric expression that represents the number of time interval
; }
//+---------------------------------------------------
//| Get Date data Information//| The parameter interval represents the data type//| Y year M month d days W week WW Week h when N minute s sec//+---------------------------------------------------Date.prototype.DatePart = function (int
Erval) {var mydate = this;
var partstr= ';
var Week = [' Day ', ' one ', ' two ', ' three ', ' four ', ' five ', ' six '];
Switch (interval) {case ' y ':p artstr = Mydate.getfullyear (); Case
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 conscience blog.——————————————————————————————————————————1 Code1 --View the current time for easy comparison2 Select getdate()3 Select DateAdd( Day,5,getdate())4 5 --today 11-02 11-01 10-31 10-30 10-29 10-28
DateAdd function:
Copy Code code as follows:
function DateAdd (interval,number,date) {
Switch (Interval.tolowercase ()) {
Case "Y": Return new Date (Date.setfullyear (Date.getfullyear () +number));
Case "M": Return new Date (Date.setmonth (Date.getmonth () +number));
Case "D": Return new Date (Date.setdate (Date.getdate () +number));
Case "W": Return new Date (Date.setdate (Date.get
FileName: date.inc.php3
Before you use these two functions, you must first convert the date or datetime to the timestamp type.
Such as:
$today =mktime (0,0,0,date ("M"), Date ("D"), Date ("Y"));
/**** simulate the DATEADD function in SQL Server *******
$part Type: string
Value range: year,month,day,hour,min,sec
Which part of the date to increase
$n Type: Numeric value
said: To increase how much, according to $part decide which part to add
Can be a ne
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 conscience blog.——————————————————————————————————————————1 Code1 Select getdate ()2Selectdateadd(month,5,getdate()) 3 Select DateAdd (month,-5,getdate())2 Show——————————————————————————————————————————The es
Analyze the causes of full DB2 Activity logs and solutions to full DB2 logs, db2 logs
Log usage
Displays the usage of logs under concurrent transaction conditions
There are three concurrent programs: Process 1, Process 2, and Process 3. Each program has two transactions. Blue blocks represent SQL statements, red blocks represent commit operations, and green bloc
Tags: database DB2DB2 Zostalking about-DB2 LUWVSDB2 ZosOverview:you may have DB2 LUW knows a lot, but little is known about DB2 Zos(Big Machine operating system) because IBM 's internal data has always been relatively closed, especially for products we rarely see on the market, such as Zos Operating system, generally in the bank's internal staff and IBM employee
Http://hi.baidu.com/wader2006/blog/item/78406b60b51f8b47ebf8f8f0.html
DB2 Common Command Set----DB2 maintenance 2007-09-09 10:10 in the DB2 development process, the whole development process also has a very important part of the work is the maintenance of the database, for the maintenance of a huge information system is very necessary; Leave a simple maintenance
Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/
1. Level correspondence• Environment variables at the operating system level• The DB2 profile registry variables at the operating system and instance levels• The Database Manager (DBM) configuration file at the instance level• The Database (db) configuration file at the database levelThe DB2 environment consists of the following parts:1)
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.