In SQL Data Compare (version 15.4.23.x), I'm encountering an issue regarding leap days. Consider a row containing the following datetimeoffset columns:

  • Column A: 2024-02-29 00:00:00.0000000 +01:00
  • Column B: 2024-02-29 09:00:00.0000000 +01:00

When generating a SQL comparison script, this gets converted into:

  • Column A: 2024-03-01 00:00:00.0000000 +01:00
  • Column B: 2024-02-29 09:00:00.0000000 +01:00

So where A gets converted wrong, B is correct. The only difference being the time part.

Any ideas on how to resolve this?

devtrading
0

Comments

1 comment

  • Jon Kirkwood
    Official comment

    Hi devtrading 

    Thank you for reaching out via the Redgate forums regarding you SQL Data Compare 

    I have replicated this using the latest version v15.4.28 and can find that the datetimeoffset on a leap year day at midnight does roll over to the next day. 

     

    I also found that Data Compare changes the source date but not on the target which is certainly an odd behaviour. 


    This will be escalated to our development team to investigate as a potential bug; I will update this forum post with any workaround/fixes as they are made available.
     

    Jon Kirkwood

Add comment

Please sign in to leave a comment.