select dateadd(s, -1, dateadd(month, datediff(month, 0, getdate())+1,0))
when i execute this query, it gives '2012-01-30 23:59:59.000'. I donno how to get it as '2012-01-30 23:59:59.997'. If anybody Know, please say.
Why on earth do you need the last possible value of today? Stop using
The problem with what you're doing is that the data type can affect what happens. If the underlying data type is