Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 165419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:55:04+00:00 2026-05-11T11:55:04+00:00

I have a table structured like this: CREATE TABLE [TESTTABLE] ( [ID] [int] IDENTITY(1,1)

  • 0

I have a table structured like this:

CREATE TABLE [TESTTABLE] (     [ID] [int] IDENTITY(1,1) NOT NULL,     [DateField] [datetime] NULL,     [StringField] [varchar](50),     [IntField] [int] NULL,     [BitField] [bit] NULL ) 

I execute the following code:

BEGIN     INSERT INTO TESTTABLE (IntField, BitField, StringField, DateField)     VALUES ('1', 1, 'hello', {ts '2009-04-03 15:41:27.378'});       SELECT SCOPE_IDENTITY()   END 

And then

select * from testtable with (NOLOCK) 

and my result shows:

2009-04-03 15:41:27.*377* 

for the DateField column.

Any ideas why I seem to be losing a millisecond??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:55:05+00:00Added an answer on May 11, 2026 at 11:55 am

    SQL Server only stores time to approximately 1/300th of a second. These always fall on the 0, 3 and 7 milliseconds. E.g. counting up from 0 in the smallest increment:

    00:00:00.000
    00:00:00.003
    00:00:00.007
    00:00:00.010
    00:00:00.013
    …

    If you need that millisecond accuracy, there’s no pleasant way around it. The best options I’ve seen are to store the value in custom number fields and rebuild it every time you fetch the value, or to store it as a string of a known format. You can then (optionally) store an ‘approximate’ date in the native date type for the sake of speed, but it introduces a conceptual complexity that often isn’t wanted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 194k
  • Answers 194k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You get WCF to work with InfoPath by using basicHttpBinding… May 12, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer You need to also load in the imported schema with… May 12, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer The answer I came up with is using the data… May 12, 2026 at 6:46 pm

Related Questions

I have a table structured as: create table a ( a bigint primary key,
I have 2 tables: posts tags Tags table is structured like this: post_id tag
I need to plot some data in various forms. Currently I'm using Matplotlib and
I know this must be a trivial question, but I've tried many different ways,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.