SELECT CONVERT(datetime, CONVERT( varchar(11), '2005-08-13 20:37:22.570', 101)) : datetime « Data Types « SQL Server / T-SQL Tutorial

Home
SQL Server / T-SQL Tutorial
1.Query
2.Insert Delete Update
3.Table
4.Table Join
5.Data Types
6.Set Operations
7.Constraints
8.Subquery
9.Aggregate Functions
10.Date Functions
11.Math Functions
12.String Functions
13.Data Convert Functions
14.Analytical Functions
15.Sequence Indentity
16.View
17.Index
18.Cursor
19.Database
20.Transact SQL
21.Procedure Function
22.Trigger
23.Transaction
24.XML
25.System Functions
26.System Settings
27.System Tables Views
28.User Role
29.CLR
SQL Server / T-SQL Tutorial » Data Types » datetime 
5.9.13.SELECT CONVERT(datetime, CONVERT( varchar(11), '2005-08-13 20:37:22.570', 101))
3>
4SELECT CONVERT(datetime, CONVERTvarchar(11)'2005-08-13 20:37:22.570', 101))
5> GO

-----------------------
2005-08-13 00:00:00.000

(rows affected)
5.9.datetime
5.9.1.datetime type
5.9.2.Store the date and time for a change in a datetime format.
5.9.3.Billings on or before a specified date
5.9.4.A BETWEEN phrase with literal values
5.9.5.Using comperison operator with Date value
5.9.6.Between date
5.9.7.SET start_Date = GETDATE()
5.9.8.Use 'LIKE pattern' match with a date type value
5.9.9.An UPDATE statement that assigns new values to datetime column with string value
5.9.10.CAST(OrderDate AS varchar)
5.9.11.Specify date with string (OrderDate = '7/4/1996')
5.9.12.Performing Date Conversions
5.9.13.SELECT CONVERT(datetime, CONVERT( varchar(11), '2005-08-13 20:37:22.570', 101))
5.9.14.Add integer and float number to a date value
5.9.15.A SELECT statement that ignores date values
5.9.16.A SELECT statement that uses the CONVERT function to remove time values
5.9.17.A SELECT statement that uses the CAST function to remove time values
5.9.18.A SELECT statement that searches for month, day, and year components
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.