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
Post a Comment