Databases for Multi Time Zone

We got two different SQL Server which are running SQL Server 2008 R2 and soon we are upgrading to one SQL Server 2012. Both are running in different time zone
I been given a task that whether is it possible to publish databases on One Server with different Time Zone( just to reduce the cost).
we got  1000+ SP's which uses Getdate() and GET date UTC function. 
My Question is that, is it possible to publish databases on a single server with multi Time zone and if yes then how do i manage those. 
Thanks

Hi,
Agree with the previous comments. The workaround is to use SWITCHOFFSET() function to calculate the time based on a time zone offset.
The following example uses SWITCHOFFSET to display a different time zone offset than the value stored in the database.
CREATE TABLE dbo.test
    ColDatetimeoffset datetimeoffset
GO
INSERT INTO dbo.test
VALUES ('1998-09-20 7:45:50.71345 -5:00');
GO
SELECT SWITCHOFFSET (ColDatetimeoffset, '-08:00')
FROM dbo.test;
GO
--Returns: 1998-09-20 04:45:50.7134500 -08:00
SELECT ColDatetimeoffset
FROM dbo.test;
--Returns: 1998-09-20 07:45:50.7134500 -05:00
See more details here:
SWITCHOFFSET (Transact-SQL)
http://msdn.microsoft.com/en-us/library/bb677244.aspx
Using time zone data in SQL Server 2008
http://blogs.msdn.com/b/sqlprogrammability/archive/2008/03/18/using-time-zone-data-in-sql-server-2008.aspx
Thanks.
Tracy Cai
TechNet Community Support

Similar Messages

  • Multi Time Zone No Longer Available

    I use Outlook 2010 on a Windows 7 machine.
    Since upgrading to the new iCloud panel, Microsoft outlook has lost the multi time zone support. Also, appointments seem to be recorded in incorrect time zones.
    I do a lot of travel for work, and my outlook is set in EST. I schedule all of my flights to start in the time some where I depart, and end in the time zone where I arrive.  For example, Depart 10AM PST, Arrive 5PM EST.  The iCloud calendar let me enter this, and it worked and synced via iCloud with my phone.  Not it only lets me have a start time zone.
    Also, when I used to accept an appointment on my phone, it would keep the correct time zone.  It no longer does.  For example, if someone send me a 10AM PST meeting, I would accept it on my phone, and it would show up in outlook at 1PM EST.  Now when someone sends me a 10AM PST meeting, and I accept it while in PST, it shows up in Outlook at 10AM EST. 
    This is causing a lot of difficulty with my job and if I can’t find a solution, I may need to go back to syncing to outlook directly and not using the cloud.
    Does anyone know why this functionality went away and how to work around it?
    Thanks!

    Thanks for the response Pondini.  Unfortunately, it didn't work...the only thing I didn't try was this and that's because I'm using Lion and the instructions say Leopard only:
    The backups may be corrupted.  Try repairing them, per item C5.
    How do I repair in Lion?  Thanks!

  • How to calculate for diffrent time zones

    I have a simple clock that shows the current time using the
    get.Time command. My problem is this. I'm in the central time zone.
    So to calculate Pacific time I subtract 2 hours from hours like so
    "hours = mydate.getHours() - 2 ;" So if it is 2pm central it
    should be 12pm in the pacific. Doing my method will show that it is
    12am when it is not. How can I fix this? Thanks in advance. Below
    is my code. I'm hoping that with a fix I can do the same for other
    time zones.
    Attach Code
    mydate = new Date();
    seconds = mydate.getSeconds();
    minutes = mydate.getMinutes();
    hours = mydate.getHours()-2;
    day = mydate.getDay();
    date = mydate.getDate();
    month = mydate.getMonth();
    year = mydate.getFullYear();
    if (hours>12) {
    hours = hours-12;
    ampm = "PM";
    } else {
    ampm = "AM";
    if (hours == 0) {
    hours = 12;
    if (minutes<10) {
    minutes = "0"+minutes;
    if (seconds<10) {
    seconds = "0"+seconds;
    if (day==0){
    day = "Sunday"
    } else if (day==1){
    day = "Monday"
    } else if (day==2){
    day = "Tuesday"
    } else if (day==3){
    day = "Wednesday"
    } else if (day==4){
    day = "Thursday"
    } else if (day==5){
    day = "Friday"
    } else if (day==6){
    day = "Saturday"
    if (month==0){
    month = "January"
    } else if (month==1){
    month = "February"
    } else if (month==2){
    month = "March"
    } else if (month==3){
    month = "April"
    } else if (month==4){
    month = "May"
    } else if (month==5){
    month = "June"
    } else if (month==6){
    month = "July"
    } else if (month==7){
    month = "August"
    } else if (month==8){
    month = "September"
    } else if (month==9){
    month = "October"
    } else if (month==10){
    month = "November"
    } else if (month==11){
    month = "December"
    time = ((hours) + ":" + (minutes) + ":" + (seconds) + " " +
    (ampm));
    datefinal = ((day) + " " + (date) + " " + (month) + " " +
    (year));

    Hi
    When you use any of the Date functions in Flash its
    referenced to the LOCAL SYSTEM Time/Date.
    So when you have a visitor in London it shows their time
    LOCAL SYSTEM (PC) time and in Sydney it shows their LOCAL SYSTEM
    (PC) time etc, etc. No need to calculate anything.
    Hope it helps

  • Application for multiple times zones?

        I have a world edition and travel quite a bit.  Anyone know of any application out there that allows one to schedule  events in more than one time zone?   What would be best is a program that allows me to enter something in my calendar that then allows me to select which time zone that event will occur in.  Barring that perhaps there is a clock program that allows me to at least see three or more times simultaneously.

    There is no software that I no of (RIM should take notice as it's a problem with the device itself).
    I have faced the same problem and I can give you half a solution. What I do is enter the apointment based on the + or minus of the GMT schedule for the time zone I'm going to be in. Of course it will be incorrect in your present time zone. However, when you change the BB clock for the new time zone all your appointments will show up at the correct time.
    Good Luck,
    jmcohen

  • How do I set up calendar events that will be for another time zone? My events shift once I travel

    How do I set up calendar events that will be for another time zone? My events shift once I travel. The same is true when I am traveling and in another time zone, how do I best set up my events so they are in the correct time slot upon my return?

    Basically, if your client does not have a Mac then don't use iWeb to create the site. iWeb is Mac only and if a client wishes to make alterations, then they need the domain file.
    If your client needs to update on a weekly basis, then why not consider using one of the online website creation packages where you can log in from any Mac or PC. This would be simpler and there are lots out there - Microsoft Office Live or Google or something like http://www.wix.com where you can create a site and use a domain name with it.
    Look at the alternatives before using iWeb.

  • Times of posts not showing correctly for my time zone

    The times of posts not showing correctly for my time zone ( I am in London UK).
    How do I fix this?
    TIA

    Your stuff>profile>edit preferences
    Barry

  • Where can I find the appropriate text string for China Time zone?

    Hi,
    Where can I find the appropriate text string for China Time zone?

    Hi,
    The following timezone strings are supported in Oracle8i 8.1.7:
    AST, ADT: Atlantic Standard or Daylight Time
    BST, BDT: Bering Standard or Daylight Time
    CST, CDT: Central Standard or Daylight Time
    EST, EDT: Eastern Standard or Daylight Time
    GMT: Greenwich Mean Time
    HST, HDT: Alaska-Hawaii Standard Time or Daylight Time.
    MST, MDT: Mountain Standard or Daylight Time
    NST: Newfoundland Standard Time
    PST, PDT: Pacific Standard or Daylight Time
    YST, YDT: Yukon Standard or Daylight Time
    Since your's isn't one of these, I'm hoping this is in reference to the Web Agent's ORDWEBUTL package, in which case, you can use an offset from GMT instead. For example, here in New Hampshire, USA, we are 5 hours behind GMT, so the offset would be -5, while in France, it would be +1 as they are one hour in front of GMT. According to my Windows clock, Beijing is GMT +8. Of course, you'll have to figure daylight-savings time into the equation, if you have to deal with such changes.
    Regards,
    Simon
    null

  • [Forum FAQ] How to convert data of date time's type stored in database to display Time Zone based on different territories?

    Introduction:
    There is a date’s type field in the database. When using the field in the report, clients want to convert the field’s values based on own Time Zone to show the date field.
    Workaround:
    Currently, Reporting Services doesn’t provide the function that can get the Time Zone of a client machine. To work around the issue, you need to add a custom code in the report to convert Time Zone and create a parameter through which the client users can
    select his/her Time Zone, and then pass the parameter value to the custom function. Please see the details as follows:
    1. Click the Report, select Report Properties and add the custom code as the screenshot shown:
    Custom code:
    Shared Function FromUTC (ByVal d As Date, ByVal tz As String) As Date
    Return (TimeZoneInfo.ConvertTimeBySystemTimeZoneId(d, TimeZoneInfo.Utc.Id, tz))
    End Function
    2. Create a parameter named TimeZone (you can name the parameter according to your requirement), select Available value and click Specify values.
    Label                                                               
    Value
    China Standard Time                                        
    China Standard Time
    Central European Time Zone                              Central European Time Zone
    India Time Zone                                               
    India Time Zone
    United States of America Time zones                   United States of America Time zones
    3. Call the custom code and type the expression to convert the Time Zone as follows:
    =Code.FromUTC(Fields!UTCDateFromDatabase.Value,Parameters!TimeZone.Value)
    Note: If you use the expression “=Code.FromUTC(Fields!UTCDateFromDatabase.Value,TimeZone.CurrentTimeZone.StandardName)”, it cannot achieve the goal because TimeZone.CurrentTimeZone.StandardName gets the TimeZone of Report Server side rather than Client side.
    More information:
    TimeZone Class
    http://msdn.microsoft.com/en-us/library/system.timezone(v=vs.110).aspx
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012

    Hello,
    Please read the answer provided by Kalman on the following thread:
    http://social.technet.microsoft.com/Forums/es-ES/446df85a-7ad8-4891-8748-478a26350c5c/how-to-compare-tables-in-two-different-servers-while-one-of-the-server-name-has-a-?forum=transactsql
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • No support for my time zone in iCal

    We recently changed to daylight savings time here in New Zealand. iCal dosen't seem to know about that, the only time zone it can find for here is 'New Zealand Standard Time' (NZST).
    NZST is GMT+12, what I need is New Zealand Daylight Time. NZDT is GMT+13. The issue is causing problems when I sync to my phone, all the times are 1 hour off.
    In Apple system prefs Time & Date it can quite happily find NZDT, but for some reason my iCal version 4.0 only has NZST.
    Actually this was never a problem last year when I had OS X 10.5, but I've since upgraded to Snow Leopard and now the problem has started.
    Any ideas?
    Thanks,
    Oliver

    Oliver,
    In System Preferences
    select Date and Time
    deselect set automatically
    make your changes manually
    and hope Apple switches on to the changes in Paradise.

  • I would like to display two system clocks for different time zones

    I would like to display a couple of time zones on my system clock. Can this be done? Like having my current location date and time and another showing the date and time for Madrid, Spain.
    If this can't be done, how do I add clocks (or calendars) to my desktop?

    In the widgets screen, click the + sign in the lower left.  This should show you the widgets you have.  World clock is the one your looking for and may not be on the first screen.  There's an arrow on the far right side to slide to the next screen.  When you find World Clock just click on it and it will add a clock.  Click again and it adds another one on top of the first.  Grab the clock anywhere on it's display and drag it to the desired location. 

  • How to handle SQL code for Daylight Savings for MST Time zone

    Hi,
    1. My time zone is MST. My data showing differently as day light saving started from November. Please help me how to handle these issue.
    2. After Mar 09 2014 Daylight saving going to end.( For this how to handle in the SQL codes)
    Please answer for the above 2 doubts.
    Thanks in advance.
    Regards,
    LuckyAbdul

    Hi Abdul,
    Daylight saving is basically like switching to another timezone. If your normal time zone is Mountain Standard Time (MST), you will switch to Mountain Daylight Time in the summer.
    If daylight saving or timezones are a concern. It is best to store your dates in a DATETIMEOFFSET(0) column. This data type includes the offset between your selected timezone (MST or MDT) and UTC. The offset between MST and UTC is -7 hours and the offset
    between MDT and UTC is -6 hours.
    Be sure to datetimeoffset(0) and not just datetimeoffset. datetimeoffset(0) uses 8 bytes to store it's data (same as datetime), but datetimeoffset uses 10 bytes. This is especially important if you are going to index this column.
    Also be sure to use a similar data type in your application or the timezone information will be lost. If it is an .Net application you should use The DateTimeOffset type. Most other programming languages have equivalent types.
    Hope this helps. If you have anymore questions please let me know.
    For more information see:
    http://msdn.microsoft.com/en-us/library/bb630289.aspx
    http://msdn.microsoft.com/en-us/library/ms187819.aspx
    http://msdn.microsoft.com/en-us/library/system.datetimeoffset%28v=vs.110%29.aspx

  • I need help with java Time Zone Updater for Venezuela Time Zone

    Hi,
    I've run the latest Time Zone Updater (1.3.5) on JRE 1.4.2. It is supposed to support the time zone changes for Venezuela. The problem is that when I set my Windows time zone and run java.util.TimeZone.getDefault() it says that I am on GMT instead of GMT-04:30.
    Am I doing something wrong?
    Thanks in advance for your help.

    I have found the solution for cases in which you cannot update your JRE to anything further than 1.5. You will have to create an extra entry in the Java tzmappings file as follows:
    Venezuela Standard Time:90,90::America/Caracas:After doing this, you will have to create a new String Value in your Windows registry for the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Venezuela Standard Time Key as follows:
    Name: MapID
    Value: 90,90
    Best regards.

  • Get actual time for specific time zone

    Dear experts,
    is it possible to get the actual time for a given time zone? We need to know the time of a certain plant and we are searching for a standard function module which calculates the time based on the plants time zone.
    Thanks in advance,
    David
    Edited by: David Claes on Apr 12, 2010 5:05 PM

    You can use TIME ZONE statement for this.
    DATA: time_stamp_s TYPE string,
                time_stamp     TYPE timestamp,
                tzone              TYPE timezone,
               wf_date_conv TYPE sy-datum,
               wf_time_conv TYPE sy-uzeit.
    tzone = 'CET'.
    CONCATENATE sy-datlo   "Local Date
                              sy-timlo    "Local Time
                      INTO time_stamp_s.
    time_stamp = time_stamp_s.
    CONVERT TIME STAMP time_stamp TIME ZONE tzone INTO DATE wf_date_conv TIME wf_time_conv.
    Otherwise FM IB_CONVERT_INTO_TIMESTAMP/IB_CONVERT_FROM_TIMESTAMP can bne used for same.
    Edited by: Satyajit on Apr 13, 2010 1:31 PM

  • Incorrect time offset settings for Russian time zones

    I'm putting new USC blade servers to production. I've discovered that if I set correct time zone for my city ( "Asia/Yekaterinburg (Moscow+02 Urals)" ), the time shown in USC Manager is one hour behind the actual time. It seems that this bug is related to any Russian time zone. For example, if I select Novosibirsk time zone (Asia/Moscow+3), the system shows correct time for my city, which is one hour behind Novosibirsk time.
    USC Manager version is 2.1(1a) (the latest version available for download from Cisco site). The system is set to obtain correct time from NTP server which is local Windows domain controller (which, in turn, syncronizes its time from Internet NTP server).
    Switching between summer and winter time in Russia was cancelled two or three years ago. I suspect that Cisco programmers are simply unaware of this fact.

    Hi Evgeniy,
    We had a bug filed for this and this was supposed to be fixed in 2.1 release.
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCtw92688
    Let me check in my lab as well and check with the engineering (if required) and communicate back to you.
    ./Abhinav

  • So is there a fix for this Time Zone bug?

    apple, is there a fix to this Time Zone bug in Calendar?

    You are not talking to Apple, just other Apple users. If you are experiencing something you think is a bug, you will have to describe it or reference some description. I am unaware of any specific Time Zone bug.

Maybe you are looking for

  • NameNotFoundException: Object not found in lookup

    Hi all! I have a problem with my Netweaver SP18 WebAS EJB application. The JNDI lookup fails with the following runtime error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CaTreeServerIFBean.

  • RE: date-time domain overhead in express queries.

    DateTimeData objects in Forte are inefficient, both in terms of memory footprint and instantiation speed. My understanding is that it stores different parts of the date as separate textdata sub-objects.. Large footprint also means they take a long ti

  • N73 Music Edition

    Hi, I am having problem with my N73 Music Edition phone. It freezes frequently. Need to remove the battery to restart again. I have updated the firmware a month back but this problem remains. If we use keys quickly the freezing occurs very often. Fir

  • Nano will not be recognised by my laptop anymore

    Tried resetting it. Re installed itunes. This has happened after updating itunes to latest version

  • How many airport express can be supported by software remote at one time.

    how many airport express can be supported by software remote at one time? I mean remote software can control at one time