Change time in sql server 2014

Asked

Viewed 2,047 times

1

Good morning, as can be seen in the image below, I made a select to get the current date and the same is +3.

inserir a descrição da imagem aqui

How can I change this date/time?

  • Change server configuration to en.

  • My question is exactly how and where do I do it.

  • Control Panel -> Region and Language -> Change Location. Change Format and Location

  • This machine is on Amazon and I don’t have access.

  • It worked @Douglas?

  • @Marconi is an alternative, we’ll probably use this one.

  • Glad I could help :)

Show 2 more comments

1 answer

2


SQL Server uses by default the regional settings that are set in your Windows.

You can only change your server configuration:

Control Panel -> Region and Language -> Change Location -> Change Format and Location

More as you have no access you can create a Query that uses the Function DATEADD subtracting the 3 hours, this way:

SELECT DATEADD(HOUR, -3, GETDATE())

Upshot:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.