September 4, 2015 at 4:48 am
Hi All,
In a table, I'm updating datetime values as below :
create table testdate (id smallint, fieldx datetime)
insert into testdate values (1,'2015-09-03 16:11:44.326')
insert into testdate values (2,'2015-09-03 16:11:44.327')
But I'm receiving the output of script select * from testdate as
12015-09-03 16:11:44.327
22015-09-03 16:11:44.327
Why my output is different from my inputs !!! Am I missing something here?
Regards.
September 4, 2015 at 4:55 am
https://msdn.microsoft.com/en-gb/library/ms187819.aspx
Rounding of datetime Fractional Second Precision
datetime values are rounded to increments of .000, .003, or .007 seconds
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy