Calculate the time (time zones)

Hello

I'm trying to calculate the time (hours and minutes) needs to travel between point a and point b in terms of the time difference between the time zones.

IE: A flight leaves New York at 17:00 and arrives in Frankfurt the next at 07:00

Thanks for your help!

SELECT TZ_OFFSET('America/New_York') new_york, TZ_OFFSET('Europe/Berlin') Frankfurt,

TO_TIMESTAMP_TZ ('20140818170000-04:00 ','yyyymmddhh24misstzh:tzm ') flight_start,

TO_TIMESTAMP_TZ ('20140819070000 + 02:00 ','yyyymmddhh24misstzh:tzm ') flight_end,

TO_TIMESTAMP_TZ ('20140819070000 + 02:00 ','yyyymmddhh24misstzh:tzm ') - to_timestamp_tz ('20140818170000-04:00 ','yyyymmddhh24misstzh:tzm ') flight_duration

OF THE DOUBLE

NEW_YORK FRANKFURT FLIGHT_START FLIGHT_END FLIGHT_DURATION
-04:00 + 02:00 18 AUGUST 14 05.00.00.000000000 PM - 04:00 AUGUST 19, 14 07.00.00.000000000 + 02:00 AM + 08:00:00.000000000 000000000

Concerning

Etbin

Tags: Database

Similar Questions

  • How the Apple Watch manages activities when I switch the time zone?

    How the Apple Watch is managing the activities and objectives when I change the time zone?

    On a long distance flight with a time zone difference of nine hours, what would be the best time to switch to the time zone of the airport of destination, so that the objective of settlement can be completed, even if there is a shorter nine hour day?

    I did mine on the plane, he took no effect until he got a signal when we arrived at the airport. I guess you must ensure that your rings are made before you change the time zone.

    I found that you had to get all your exercises in the hours that were left in your day shortened to your destination.

  • Calendar entry for flights crossing the time zones

    I fight to find the right method to enter a calendar event that starts in a time zone and ends in another.  It is often the case for the flights of the airline.  Example: My departure is from New York (JFK) at 12:00 noon Monday and arriving in Seoul, Korea is at 16:24 (local) Tuesday.  I cross the road to the International Dateline. With Support for time zones "lit", how to capture these moments so that they are accurate, once arrived in Seoul?

    Even more difficult: due to cross the International Date line on my return, I arrived in New York earlier that my time of departure the same day.

    Any suggestions on how to deal with this would be appreciated!

    Paul

    If you enable support for time zones, each entry includes the time zone setting. Select the correct time zone for each. Move real time you you include an entry in the "travel time" drop-down menu. Otherwise enter time manually and identify the zone in the title.

  • Cannot set the time zone of Moscow winter + 3 hours.

    Cannot set the time zone of Moscow winter + 3 hours.
    Set the time zone Minsk 3 after the GPS clock moves forward 1 hour, timezone is set back from Moscow + 4.
    It is an error of your software when you are ready to address this issue.

    Automatic deactivation date & time(Settings>Date&Time...)

  • How to get the time based on the time zone?

    Hi all

    I try to get timestamp based on the time zone I assign in the computer... for example right now I m CA, if I change the time zone of the computer IS, and use time get Sec.vi, I always get time to CA.

    and not the ACC at EST time... How can I get the time according to the time on my laptop?

    Think I remember vaguely that LV reads this parameter when loading, then try to restart LV after changing the time zone and see if that helps.

  • to try to correct the time zone schedule probs w/xp

    I'm trying my timezone and it won't work, or if it's hard to find exactly the right download. I live in the area (Florida) Eastern time and my clock is off. as now, the actual time is 15:11 and my comp says 02:49. How can I fix? {Furthermore, I'm not comp wiz, simple terms would help a lot... haha: 0}

    Hi imsukr8zee,

    Thank you for visiting the community Microsoft Windows XP.  To change the time on your computer, follow these steps:

    1. right click on the time located on the right side of your screen.

    2. Select Adjust Date/time.

    3. click the time zone tab and make sure the correct time zone is selected.

    4. click on the Internet time tab and make sure that there is a check in the automatically synchronize with a time server Internet and the box Server time.windows.com.

    5. click on update now if changes have been made.

    6. click apply and then OK.

    Please let us know if this helped.

    Dena
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • to change the clock to the time zone of the East, but it is not in my time zone tab, how do I fix

    to change the clock to the time zone of the East, but it is in my time zone tab is downloadable

    http://www.pchelpforum.com/Windows-Vista-7/103836-how-change-Windows-Vista-time-zone-clock-Eastern.html

    http://WindowsXP.MVPs.org/timezones.htm

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-the-display-of-dates-times-currency-and-measurements

    Hope this works

  • I want to change the time zone in standard time, but it is not located in leFuseau horaireonglet

    I want to change my time zone to count at the normal time, but it is not in the time zone tab

    Hello

    ·          How are you trying to change the time zone?

    ·          You can see all the other time zones are included in the list?

    Please refer to:

    http://Windows.Microsoft.com/en-us/Windows-Vista/set-the-clock

  • U410 - cannot connect after Windows Update after restore factory when the time zone is not UTC-8.

    Steps to reproduce the error:

    1 use OneKey recovery to restore the initial factory settings.

    2. on the initial setup of Windows screen, select a time zone to UTC - 8, UTC (London)

    3. connect to Windows, open the Windows Update control panel and click on "Install updates"

    4 restart the computer to complete the update.

    5. on the login screen, try to connect or shutdown the computer.

    Result:

    Computer is blocked with the only desktop wallpaper and mouse pointer visible. Does not meet all the keys. By pressing the power button sleep machine. Press again on he wakes the machine in the blocked State.

    I have reproduced this problem 3 times for initial help restore every time.

    Wordaround:

    Before starting the factory restore processes, set the clock of system by 24 hours. After the end of the restoration of the factory, set the system clock to the correct time.

    Otherwise, wait 24 hours between a factory reset and try to install the Windows updates.

    Analysis:

    This problem is caused because of the way that Windows stores time. It assumes that the system clock is set to local time rather than UTC. When you use the OneKey recovery system he doesn't know what time zone of the system clock is set on, and so it assumes that it is set to UTC - 8. If it is in fact the UTC value, OneKey Recovery creates files with a time stamp of 8 hours in the future. This causes the Windows Update to fail.

    One step that I forgot to mention, that may be important:

    After the installation of the plant, during the initial configuration screens, I updated the time zone GMT London.

    Since the OneKey recovery uses GMT - 8, this can cause some files to have a timestamp of 8 hours in the future. Maybe if I waited 8 hours before the update of this problem would not occur. I'll test this by setting the clock system for 1 week in the past, make reset factory and then it retroactively to the correct date before the update.

    EDIT: Test successfully. This workaround works.

  • How to: set the time zone on a new event before adding it to the calendar?

    I want to add a new event to the calendar, but when I do gets set to a time zone from the casablanca time which means GMT, I want to solve it the current time zone of users.  What is happening now is that if the user manually changes the time zone then the start time of the event changes too.

    Here is my code so far:

    EventList _eventList = null;
                    try{
                        _eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
                    }catch(PIMException e){
                        Dialog.inform("PIMException : " + e.getMessage());
    //                  return false;
                    }
    
                    BlackBerryEvent bbEvent = (BlackBerryEvent)_eventList.createEvent();
                    java.util.Calendar cal = java.util.Calendar.getInstance(); 
    
                    long start = cal.getTime().getTime();
                    if (_eventList.isSupportedField(Event.START)) {
                        bbEvent.addDate(Event.START, 0, start);
                    }
                    if (_eventList.isSupportedField(Event.END)) {
                        bbEvent.addDate(Event.END, 0, start + 3600000);
                    }
                    if (_eventList.isSupportedField(Event.SUMMARY)) {
                        bbEvent.addString(Event.SUMMARY, 0, title);
                    }
                    if (_eventList.isSupportedField(Event.LOCATION)) {
                        bbEvent.addString(Event.LOCATION, 0, address+", "+city);
                    }
                    if (_eventList.isSupportedField(Event.)) {
                        bbEvent.addString(Event.LOCATION, 0, address+", "+city);
                    }
                    Invoke.invokeApplication( Invoke.APP_TYPE_CALENDAR, new CalendarArguments(CalendarArguments.ARG_NEW, bbEvent) );
    //
    

    How can I set the time zone before calling Invoke.invokeApplication?

    OK, never mind, my Simulator has been updated with the different time zone, I thought he would pick uop, the right one.  Once I manually put itt o the right zoneit works as expected today.

  • calculate the time difference.

    Hello

    How to calculate the time difference by using javascript.

    Example 15.05 and18.35 difference is 2 h 30 min

    BTW: it isn't ~ 2h30min is 3h30min

    Maybe something like this works:

    // result is 3.300000000000002 ~ 3h 30min
    (parseFloat((18.35 - 15.05) / 3600) * 3600)
    
  • Having a problem in DateFormat when the time zone is changed...

    Hi, the following code converts a Date string to a Date which I am able to successfully... The problem I am facing is when I put the Moble zone as the format of Casablance (GMT) and my Format for a Date string is "2009-09-27 03:02:00:00 of" "" then I am to get the hour of the date as "kills Sep 27 03:02:00 GMT 2009", but when the time zone is changed to Canberra, Sydney (+ 10), the Date is "Mon Sep 28 19:37:13 Australia/Sydney 2009"... which is not the correct date in strgin Format ' "» nicely in this matter helps no matter what time zone after the conversion, I should get the date given to a string date... help kindly with respect to thei...

    public static Date getDateTmeFrmStrgFormat(String strDate)
         {
    
             Date date;
             String month,day,year,hour,min,sec;
                         month = strDate.substring(0,strDate.indexOf("/"));
                if(month.length() < 2) month = "0" + month;
    
                strDate = strDate.substring(strDate.indexOf("/") + 1);
    
                day = strDate.substring(0,strDate.indexOf("/"));
                if(day.length() < 2) day = "0" + day;
    
                strDate = strDate.substring(strDate.indexOf("/") + 1);
    
                year = strDate.substring(0,strDate.indexOf(" "));
    
                strDate = strDate.substring(strDate.indexOf(" ") + 1);
    
                hour = strDate.substring(0,strDate.indexOf(":"));
                if(hour.length() < 2) hour = "0" + hour;
    
                strDate = strDate.substring(strDate.indexOf(":") + 1);
    
                 min = strDate.substring(0,strDate.indexOf(":"));
                if(min.length() < 2) min = "0" + min;
    
                strDate = strDate.substring(strDate.indexOf(":") + 1);
    
                sec = strDate;
                if(sec.length() < 2) sec = "0" + sec;
    
                //sec = "00";
                date = new Date (HttpDateParser.parse(year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec));
                //date = new Date (HttpDateParser.parse(year + "-" + month + "-" + day + " " + hour + ":" + 00 + ":" + 00)); 
    
                return date;
            }
    

    Like this.  This code is NOT tested, it is presented only to explain the use of the calendar in this situation.

    public static Date getDateTmeFrmStrgFormat(String strDate)     {         String month,day,year,hour,min,sec;         month = strDate.substring(0,strDate.indexOf("/"));         strDate = strDate.substring(strDate.indexOf("/") + 1);         day = strDate.substring(0,strDate.indexOf("/"));         strDate = strDate.substring(strDate.indexOf("/") + 1);         year = strDate.substring(0,strDate.indexOf(" "));         strDate = strDate.substring(strDate.indexOf(" ") + 1);         hour = strDate.substring(0,strDate.indexOf(":"));         strDate = strDate.substring(strDate.indexOf(":") + 1);         min = strDate.substring(0,strDate.indexOf(":"));         strDate = strDate.substring(strDate.indexOf(":") + 1);         sec = strDate;         Calendar cl = Calendar.getInstance();         cl.set(Calendar.YEAR,|Integer.parseInt(year));         cl.set(Calendar.MONTH,|Integer.parseInt(month)-1);         cl.set(Calendar.DATE,|Integer.parseInt(day));         cl.set(Calendar.HOUR_OF_DAY,|Integer.parseInt(hour));         cl.set(Calendar.MINUTE,|Integer.parseInt(min));         cl.set(Calendar.SECOND,|Integer.parseInt(sec));         return cl.getTime();     }
    
  • do not get the time zone on the basis of the city.

    Hello guys, I'm getting the time zone based on the region,

    As America/LosAngelies(-8);

    But I want that on the basis of the town as London(-7) and Adeleid (+ 5);

    How can I achieve this. Help, please.

    Resolved.

    Use the method of getDisplayNames (0). For time zones the device all.

  • Change the time zone in CS-MARS 5.3.2

    When I try to change the time zone (with: "set time zone") on the CLI of MARCH, I was evicted and the session is closed... Who knows what to do?

    Best regards, Robbert

    I just had exactly the same thing happen on a 100th test running 4.3.2. The message was something about "session timeout" (you can not see unless you connect to the session in Putty). I don't know exactly how I corrected. I configured NTP and tried later... still logged on. I then changed the time-out settings in admin-> system settings and tried later in... still logged on. I change the settings for timeout back and all of a sudden I wasn't be disconnected. Not exactly what fixed it, but probably one of those things.

  • You cannot change the time zone

    I lived in the Central time zone for more than 30 years, but my Windows 7 computer has turned to the Pacific time zone and does not allow me to change the Central time zone?

    OT: Windows 7

    Hi Robert,.

    Thanks for posting your question in the Microsoft Community.

    Of the question above, you are not able to change the time zone.

    What is the accurate and complete error you get when you try to change the time zone?

    Method 1: Setting the clock
    http://Windows.Microsoft.com/en-us/Windows7/set-the-clock

    See also, Synchronizing with a time server Internet, from the link mentioned above.

    Method 2: I suggest you try the steps from the following link:

    You cannot change the time and date if the time zone is set in Samoa (UTC + 13:00) and Ko 2657025 is installed in Windows 7 or in Windows Server 2008 R2

    http://support.Microsoft.com/kb/2660075

    Get back to us and let us know the State of the question, I'll be happy to help you. We, at tender Microsoft to excellence.

Maybe you are looking for

  • I can't find any pictures on my HARD drive

    Why can't I find one of my pictures on my hardware?I got a new laptop a few weeks ago and now I wanted to open your my material in the new laptop to see my photos, but they are not there.Someone else has the same problem?

  • Where can I find a new screen for Satellite L40

    Where can I find the screen for satellite L40? The screen is broken and he is almost nine laptop. Please let know me.

  • Low frequency

    Hai guyz, I developed a code to save the data while the cDAQ is read. The amount of the fine when I set to 1 Hz with the recording of the data showing the data taken every 1 sec interva. But when I tried to make it to 0.017 Hz displays error codes. T

  • Problems with graph XY 'forget' field properties

    I have problems with a graphic XT in my loop. The graph has 10 locations which at any time can have anything from 0 to ~ 1000 points, often a few plots will have much less ploints than others. There is an option to select the user to view all items o

  • Sidebar gadget problem

    My sidebar Gadget includes Stocks.  Recently, he was a black box with the message "Service unavailable."  Help.