Using SQL Server 2005
Table1
Time
12/05/2009 08:30:49
12/05/2009 17:00:00
13/05/2009 21:00:00
…,
Above Table Both values are same column, Here I want to separate column like Date and Time
Expected Output
Date Time
12/05/2009 08:30:49
12/05/2009 17:00:00
13/05/2009 21:00:00
You can retrieve separate date and time parts like:
For more information, see the CONVERT documentation.
The code snippet above returns the DataPart and TimePart as a varchar. If you’re interested in retrieving them as a datetime field, try: