How to get date from sql server in user specified format -


i want date sql server in user specified format using getdate() function.

if give query

select getdate() 

then displating output date in format

2015-03-17 07:29:58.377 

but want output .

2015-03-17 

what statement should added query result. me problem.

just use convert():

select convert(varchar(10), getdate(), 121) 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -