If we execute the query with given data
SELECT [InsertedOn]
FROM MyLogs
WHERE [InsertedOn] BETWEEN '20090131' AND '20090131 23:59:59:999'
The output is as follows...
2009-01-31 00:00:00.000
2009-01-31 00:01:01.000
2009-01-31 12:59:59.127
2009-01-31 00:01:01.000
2009-01-31 13:00:00.997
2009-01-31 00:01:01.127
2009-02-01 00:00:00.000
2009-01-31 00:01:01.000
2009-01-31 21:59:58.347
2009-01-31 23:59:59.997
2009-01-31 00:01:01.000
2009-01-31 21:59:58.347
2009-02-01 00:00:00.000
2009-01-31 00:01:01.000
2009-01-31 22:59:58.347
2009-01-31 09:01:30.347
2009-02-01 00:00:00.000
with the above result the answer for the given questions will contain the value 2009-02-01 00:00:00.000.....
will not contain the following value
2009-01-30 00:00:00.000