Tag:man where last Rounding and location str add init SELECT * from EMP where job = ' Clerk ' or job = ' MANAGER ' and Sal >= 1200; SELECT * from emp ORDER by Hiredate;select * from EMP, deptwhere EMP. DEPTNO = DEPT. deptno;
--some basic SQL functions used--Returns the value of the middle-aged: SQL year function.--Returns the value of the month in the date: SQL month function.--Returns the value of the day of the date: SQL time function. --date_add (): function adds a
SQL Server Time article: *************************************************************One, Time function--getdate Get current timeSelect GETDATE ()--dateadd Original time Add: 2013-02-17 13:20:16 this time plus 12 monthsSelect DATEADD (month,12, ' 20
Transfer from http://hi.baidu.com/juanjuan_66/blog/item/cf48554c9331fbe6d62afc6a.htmlOracle Date Subtraction2012-02-10 12:18--months_between (DATE2,DATE1)Give the month of date2-date1Sql> Select Months_between (' 1 September-December-1999 ', ' 1
One, Time functionWhen you use stored procedures, SQL functions, you encounter some processing of time. such as the acquisition of time and the addition and subtraction. In this case, the SQL comes with the time function. Below I list these
First, common String functions:
1. Char_length Gets the length (in characters)
2. Format formatted
3, insert replace the way inserted
4. INSTR Get Location
5, Left/right take left, take right
6. Length Gets the lengths
About SQL Server database date functions1. Get current time Select GETDATE ()2, intercept the required valueSelect DATEPART (year,getdate ())Select DATEPART (month,getdate ())Select DATEPART (day,getdate ())Select DATEPART (hour,getdate ())Select
Inserting data
insert(table, nullColumnHack, values)Table: Tables NameNullcolumnhack: Default value for empty columnsValues: A map that encapsulates column names and columns, representing a single piece of data
Delete data
As a function, a Date object can be called directly, returning a string of the current date and time.Date () //"Sat 12:46:54 gmt+0800 (CST)"Date (1, 1) //"Sat Mar 12:46:54 gmt+0800 (CST)"var today = new Date (); Get current time
DB2 time functions are one of our most common functions. The following describes some DB2 time functions for your reference. We hope you can learn more about DB2 time functions.
-- Get the current date:
Select current date from sysibm.
This article mainly introduces how to use VBS to get the previous day of the current date and correct the output format. For more information about how to obtain the current date, see method 1:
Currentdate1=date()msgbox Currentdate1
Method
This article mainly introduces the code for vbs to obtain the current time and date. For more information about how to obtain the current date, see method 1:
Currentdate1 = date () msgbox Currentdate1
Method 2:
Currentdate2 = year (Now) & "-" &
[Java]View Plaincopyprint?
Import Java.text.SimpleDateFormat;
SimpleDateFormat formatter = new SimpleDateFormat ("yyyy mm month DD Day HH:mm:ss");
Date curdate = new Date (System.currenttimemillis ()); Get current time
String str =
var mydate = new Date ();mydate.getyear (); get Current year (2 -bit ) mydate.getfullyear (); get the full year (4 -bit , 1970-????) Mydate.getmonth (); get the current month (0-11,0 represents 1 months ) mydate.getdate (); get current day (1-31)
often get a user submitted the current date, we need to use this date as the basis to return it the day before, the date of the following days or conversion operations. Python can be a very simple solution to these problems with date calculations .
The response response object mainly passes the result of the JSP container processing back to the client. You can set the state of HTTP through the response variable and send data to the client, such as cookies, HTTP file header information, and so
Commonly Used in DB2 development ----- date function (commonly used date function) get time 1. Get current date: values current date; 2012-08-28 2. Get current time of values; 11:56:36 3. Obtain the current timestamp; 2012-08-28 11:57:32 4. year ()
The code is as follows: 1 #!/usr/bin/env Python 2 #-*-coding:utf_8-*-3 # Get test Case file Excel 4 5 import xlrd 6 import JSON 7 8 9 class Createexcel:10 def __init__ (self): one pass @classmethod def open_excel (CLS): PA th = "Testcase.xls",
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.