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())
Select GetDate()
1. Select CONVERT(Varchar,GetDate(), 120)
2. Select DateAdd(MS, -DatePart(MS,GetDate()), GetDate())
No comments:
Post a Comment