taylorswiftlover Posted March 28, 2020 Report Share Posted March 28, 2020 Hello, Wondering if someone can provide me an answer to this. I know that when I set a DataType to TimeStamp, I can easily edit the timezone to its design: But when I use calculated field/value and use SysDateTime, how do I set its timezone? Quote Link to comment Share on other sites More sharing options...
0 Alison Posted April 1, 2020 Report Share Posted April 1, 2020 Hello @taylorswiftlover, According to the documentaion, SysDateTime() function returns current system timestamp. More details can be found here:https://docs.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql?view=sql-server-ver15 Also, you can use the following function to get UTC date and time - SYSUTCDATETIME() To make it more relevant to another timezone you should use Dateadd() function. More details can be found here:https://docs.microsoft.com/en-us/sql/t-sql/functions/dateadd-transact-sql?view=sql-server-ver15 Hope it helps. Quote Link to comment Share on other sites More sharing options...
0 taylorswiftlover Posted April 4, 2020 Author Report Share Posted April 4, 2020 On 4/1/2020 at 7:09 AM, Alison said: Hello @taylorswiftlover, According to the documentaion, SysDateTime() function returns current system timestamp. More details can be found here:https://docs.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql?view=sql-server-ver15 Also, you can use the following function to get UTC date and time - SYSUTCDATETIME() To make it more relevant to another timezone you should use Dateadd() function. More details can be found here:https://docs.microsoft.com/en-us/sql/t-sql/functions/dateadd-transact-sql?view=sql-server-ver15 Hope it helps. Thank you @Alison!!! Quote Link to comment Share on other sites More sharing options...
Question
taylorswiftlover
Hello,
Wondering if someone can provide me an answer to this. I know that when I set a DataType to TimeStamp, I can easily edit the timezone to its design:
But when I use calculated field/value and use SysDateTime, how do I set its timezone?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.