How to set database timezone in sql server to store multiple countries data in a single sql server? RRS feed

  • Question

  • Hi

    In our Organization, we are planning to have different countries business data in single server.

    Here we are having issue when we have date values, it will be stored as server time.

    Do we have any database level parameters (options)  to define timezone? (for GETDATE() like functions)

    We can create user define table and store timezone offset and we can go with that. It is time consuming one and requires lot of code chane.

    However ,if we have any other easy ways, please share here.



    Wednesday, August 17, 2016 1:02 PM


All replies

  • Hi Muthu V,

    we have grouped countries with similar timezones (more or less) in the same Always On virtualized by VMWare, e.g, we have AU and NZ together.

    I'm sorry for not being helpful, I have not any idea how to get that.

    Wednesday, August 17, 2016 1:08 PM
  • Hello,

    Better store UTC timestamps (GETUTCDATE (Transact-SQL)), it can be calculated to the local time on the fly, either in SQL Server or on application side

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, August 17, 2016 1:31 PM