A Bug When Mixing datetime and datetime(2) Data Types

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 21

  • @alexandermayerkirstein
    @alexandermayerkirstein 25 วันที่ผ่านมา +2

    Uber kudos for not deploying a prerecorded opening for your videos. I find I look forward to whatever unique shannanegans you’ll open with, not to mention the always possible chance for some random belly holding cough up my coffee humor highly likely to ensue. And your content is nice too. What I never suspected was you obtained beer-gut magazine certification. Way to go beer-gut buddy!

    • @ErikDarlingData
      @ErikDarlingData  25 วันที่ผ่านมา

      The Beer Gut Magazine certification is my proudest accomplishment. Some people still talk about being an MCM like it’s a big deal they had 20 grand and nothing to do for three weeks in 2010. How bizarre.

  • @pearcegrinnell1809
    @pearcegrinnell1809 26 วันที่ผ่านมา +1

    Wow that is definitely interesting. Thankfully I have never mixed these datatypes.

  • @user-zr6zy1bn5j
    @user-zr6zy1bn5j 26 วันที่ผ่านมา +1

    That’s interesting and more informative, thanks for posting

    • @ErikDarlingData
      @ErikDarlingData  25 วันที่ผ่านมา

      Glad you enjoyed it. It’s definitely an oddball thing.

  • @Chompingbits
    @Chompingbits 24 วันที่ผ่านมา +1

    Bashing keys uselessly is my job title though!

    • @ErikDarlingData
      @ErikDarlingData  24 วันที่ผ่านมา +1

      Distinguished Key Basher I’m sure!

  • @FlaggedStar
    @FlaggedStar 25 วันที่ผ่านมา

    This is the only behaviour change that comes with changing compatibility levels that I expect anyone to actually notice. I've done a lot of 90 to 150 conversions.

    • @ErikDarlingData
      @ErikDarlingData  25 วันที่ผ่านมา

      Really? Nearly every emergency help email I get is someone who moved to a higher compatibility level and had a total meltdown.

    • @FlaggedStar
      @FlaggedStar 25 วันที่ผ่านมา

      @@ErikDarlingData Yeah. Just behaviour, mind. Not performance.

  • @cartercordingley6062
    @cartercordingley6062 24 วันที่ผ่านมา +1

    Hey, this is really useful information, thanks!
    My thoughs, I know that datetime only works from 1753 (the first full year after the Gregorian calendar was adopted in Europe, Asia, and America). Also, the Microsoft documentation says that datetime shouldn't be used, and that it's more of an issue with C# LINQ that needs to be updated to use datetime2 instead of datetime.
    I also noticed that datetime has a time range of 00:00:00 through 23:59:59.997, so I'm wondering if this is only a problem when it's in the .003 range. Further down in the document, it says that datetime has an accuracy rounded to increments of .000, .003, or .007 seconds. I've never really looked at the documentation for datetime past the first bit.
    I think someone needs do some searching to see if there's a C# bug to vote on for an update to use datetime2, since the Microsoft documentation says not to use datetime.
    Also I wonder how these examples would handle datetimeoffset type

    • @ErikDarlingData
      @ErikDarlingData  23 วันที่ผ่านมา +1

      Oh, yeah, the documentation for datetime is kind of fascinating. The deeper you go the weirder it gets. I suppose the main takeaway is to not mix and match data types.
      You get what you pay for when you go down that path.

  • @DanielMaenle
    @DanielMaenle 22 วันที่ผ่านมา +1

    Not the best at getting functionality
    But with the index issue. Curious if a table spool create would cause the issue as well

    • @ErikDarlingData
      @ErikDarlingData  22 วันที่ผ่านมา

      Probably not a table spool, but potentially an index spool

    • @DanielMaenle
      @DanielMaenle 22 วันที่ผ่านมา

      @@ErikDarlingData Joys for random data to return then . .....

    • @ErikDarlingData
      @ErikDarlingData  22 วันที่ผ่านมา

      @@DanielMaenle THE JOYFULNESS IS OVER

    • @DanielMaenle
      @DanielMaenle 22 วันที่ผ่านมา +1

      @@ErikDarlingData THE DRINKING BEGINS!

    • @ErikDarlingData
      @ErikDarlingData  21 วันที่ผ่านมา

      @@DanielMaenle It sure does my friend.

  • @stevethedba
    @stevethedba 26 วันที่ผ่านมา +1

    I voted