question

PauloJose-7938 avatar image
0 Votes"
PauloJose-7938 asked AnuragSharma-MSFT commented

Time is wrong sql server azure

I'm using the sql bank in the region, south brazil, but the time is wrong, it is not in accordance with the time in my region.

azure-sql-database
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PauloJose-7938 , just wanted to check if you need more information on this, if answer helped you can mark it 'Accept Answer'

0 Votes 0 ·

1 Answer

AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered

As you can read here SQL Azure uses UTC time on all data centers.

You can convert UTC to Brazil time using AT TIME ZONE as explained here. See below example:

 /* Now Switch to Brasil DateTime: */
    
 SELECT @BrasilDateTime = SWITCHOFFSET(@UTCDate, DATENAME(TZ, @UTCDate
    
 AT TIME ZONE ‘E. South America Standard Time’))



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.