CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)DescriptionThis style is typically in the time type (Datetime,smalldatetime) and the string type (Nchar,nvarchar,char,varchar)It is only used when converting
Software development and outsourcing to Japan-Project Management
Over-bandwidth: over-bandwidth exceeding the unit pricePre-production: pre-productionSpecies: species: SpeciesTime limit setting: Time Limit settingMarkLoading Rate indexing: loading
A, date () function
string Date (string $format [, int $timestamp])Function: Formats the timestamp as an easy-to-read time and date.
Parameters
Description
Format
Necessary. Specifies
SQL statement gets a specific date
1. The first day of one months
Select DATEADD (mm, DATEDIFF (Mm,0,getdate ()), 0)
2. Monday of this week
Select DATEADD (wk, DATEDIFF (Wk,0,getdate ()), 0)
3. The first day of the year
Select DATEADD (yy,
Reproduced in this blog, the original blog: http://blog.csdn.net/baiduandxunlei/article/details/9180075CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)DescriptionThis style is typically in the time type
Source: http://www.cnblogs.com/Gavinzhao/archive/2009/11/10/1599690.htmlUse convert in SQL server2000 to get the datetime data type style (full)Processing of date data formats, two examples:CONVERT (varchar (16), time one, 20) results: 2007-02-01 08:
first, related categories1. Date:Date represents a specific moment, accurate to milliseconds, and the corresponding method in date is deprecated, starting with JDK 1.1, you should use the Calendar class to implement conversion between date and Time
The Date type in ECMAScript is built on the Java.unile.Date class in early Java. This date type uses the number of milliseconds since UTC (Coordinated Universal time, international coordination times) to start at midnight January 1, 1970 to save
SQL Server Date functionThe following table lists the most important built-in date functions in SQL Server:
function
Description
GETDATE ()
Returns the current date and time
DATEPART ()
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.