How can we help you today? How can we help you today?

AT TIME ZONE not working?

Creating a table like this:

CREATE TABLE TimezoneTest
(
   utctime DATETIME2(2) NOT NULL
 , starttime AS CAST(utctime AT TIME ZONE 'UTC' AT TIME ZONE 'W. Europe Standard Time' AS DATETIME2(2))
);


Works fine, but SQL Compare 13.2.1.5640 generates invalid code like this when comparing:
CREATE TABLE [dbo].[TimezoneTest]
(
   [utctime] [datetime2] (2) NOT NULL,
   [starttime] AS (CONVERT([datetime2](2), AT TIME ZONE  AT TIME ZONE ,(0)))
) ON [PRIMARY]

henrik_ffc
0

Comments

1 comment

  • RichardL

    Hi @henrik_ffc


    Thanks for your post. 

     

    This looks like a question that one of Support engineers will need to investigate for you.

     

    If you've a got support contract, please send us a ticket. Provide as much information as you can - screenshots of any errors, log files etc – so we can help you as fast as possible.

    If you're not covered by a Support contract at the moment, email our Sales team at sales@red-gate.com, and they'll be able to help.

    RichardL
    0

Add comment

Please sign in to leave a comment.