Showing posts with label remove time from datetime. Show all posts
Showing posts with label remove time from datetime. Show all posts

Tuesday, August 9, 2011

SQL truncate decimal points, Get only Date


SQL get only date and not time

For Ex: 12/07/2009 and not 12/07/2009 10:09:20...

convert(varchar(10),@YOUR_DATE,101)

SQL Remove decimal points

For Ex: 203.98 and not 203.98079
select cast((123.456-(123.456%.001)) as decimal (18,2))