MS SQL datetime precision problem

后端 未结 7 1363
无人共我
无人共我 2021-01-05 11:37

I have a situation where two persons might work on the same order (stored in an MS SQL database) from two different computers. To prevent data loss in the case where one wou

7条回答
  •  走了就别回头了
    2021-01-05 11:54

    YOu have to make sure your time precisions line up - this is mostly doable by having the proper logic on the C# side to actually reduce the precision under that which is native in the DateTime object - basically make suer you have for example timestamps always in Seconds, not lower, across all layers.

    If you do that properly, the timestamp across all layers will be immediately comparable.

提交回复
热议问题