Sql remove milliseconds and Date Conversion -


please 1 suggest me getting right results?

i have date field results in "2016-07-08 10:09:22.910" format , wish remove milliseconds , same time wish convert field in "08/07/2016 10:09:22"

i managed remove milliseconds using convert(varchar, [datefilecreated], 20) unable convert in desired format.

please suggest

in sql server ,you can use format available sql server 2012

select format ( getdate(), 'yyyy-mm-dd hh:mm:ss' )  

output:

2016-07-11 07:13:33 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -