Timezone setting in SQL SERVER 2012

  • Hi, 
      How to change/display the client system  date and time using datetime datatype. Is there any setting to change timezone in SQL SERVER builtin?

    Thanks,
    Ram

  • sram24_mca - Monday, August 20, 2018 10:11 PM

    Hi, 
      How to change/display the client system  date and time using datetime datatype. Is there any setting to change timezone in SQL SERVER builtin?

    Thanks,
    Ram

    SQL Server uses the host's timezone. If you change the timezone of the Host Server, the time displayed in SQL Server will change as well. If timezones are important for your data, ensure you use UTC time and convert it at application level for the User based on their local timezone (or display the UTC time to them and get them to do the maths), or use datetimeoffset, and you can then make use of SWITCHOFFSET. The datetime datatype has no concept of timezones.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thanks Can we have conversion script for IST and EDT Format?

  • sram24_mca - Wednesday, October 17, 2018 7:28 AM

    Thanks Can we have conversion script for IST and EDT Format?

    What was wrong with the help I gave you here?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply