I have 2 databases on the same SQL Server. Is it possible to have one in PST and the other in EST?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, The date/time is derived from the operating system of the computer on which the instance of SQL Server is running.
You could however have a custom UDF that you would call instead of getdate() and then do the timezone change in that UDF. You can also assign default values to columns with something like this
Now when you do an insert it will use the default
….this of course won’t work on updates and also someone could update that value
If you want to use GMT then use
GETUTCDATE