|
|
SELECT GETDATE()
returns 2007-12-17 21:17:33.933
Let us quickly see how to return only the date portion in different formats
YYYY-MM-DD
SELECT CONVERT(VARCHAR(10), GETDATE(), 120)
returns 2007-12-17
MM-DD-YYYY
SELECT CONVERT(VARCHAR(10), GETDATE(), 110)
returns 12-17-2007
DD-MM-YYYY
SELECT CONVERT(VARCHAR(10), GETDATE(), 105)
returns 17-12-2007
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |






comments
4 Responses to "Return date without time using Sql 2005"thanks for coorect dta related with dates
great information
Thanks!
Super work, can you also specify how to put "/" in place of "-"
Post a Comment