This portal is to share my acquired knowledge related to Sql Server. I hope will be helpful for novice and professionals.

Saturday, July 28, 2012

Remove Milisecond from DateTime value.

I like to use following two ways to get rid of Milisecond from DateTime value:

Select GetDate()

1. Select CONVERT(Varchar,GetDate(), 120)

2. Select DateAdd(MS, -DatePart(MS,GetDate()), GetDate())

No comments: