26 November, 2010
0 Comments
1 category
CONVERT(VARCHAR(8),GETDATE(),108)
Result
14:12:30
Other examples
print convert(varchar(30),getdate(),121)
— Result: 2011-05-09 12:04:31.883
— Result: 2011-05-09 12:04:31.883
print convert(varchar(30),getdate(),113)
— Result: 29 Apr 2011 13:41:23:327
— Result: 29 Apr 2011 13:41:23:327
Tags: T-SQL
Category: Uncategorized