How to properly format the time

Hi master,

I tried to do a query involving two data: from_time and to_time. It's the query I used and its result:

SQL > Select shift_num,.

2 from_time,

3 to_time

4 of bom_shift_times

5 where calendar_code = "GRUPO AZOR"

6 and shift_num (2, 4, 11);

SHIFT_NUM FROM_TIME TO_TIME

----------            ----------             ----------

2 21600 50400

4 50460 78000

11 50460 70800

I expect to get the result as follows:

SHIFT_NUM FROM_TIME TO_TIME

----------           ----------              ----------

2                  6:00                14:00

4 14:00 21:40

11 14:00 19:40

Do you have any suggestions? Thanks in advance

Roberto

First suggestion: do not store time seconds. Use the built-in data INTERVAL type (as the time of day is just an interval, measured from midnight).

Second suggestion: the following example converts second intervals:

Select

NUMTODSINTERVAL (21600, "second")

Of

Double

Third suggestion: the following example converts seconds interval, formats such as hh: mi:

Select

TO_CHAR (extract (hour of numtodsinterval (21600, 'the other')), '09')

|| ':'

|| trim (to_char (extract (minute numtodsinterval (21600, 'the other')), '09'))

Of

Double

Tags: Database

Similar Questions

  • How can I change the time on my computer from 24 hour to 12 hour clock clock?

    How can I change the time on my computer from 24 hour to 12 hour clock clock?

    How can I change the time on my computer from 24 hour to 12 hour clock clock?

    Here is the method for Windows 7. If you are using Vista, there may be a slight difference, but basic procedures should be similar...

    Start > Control Panel > region and language > Format > more settings > time tab >

    under time format, set hh: mm hh: mm

    H = 24 hours

    h = 12 hours

    Click OK when finished.

  • How can I set the time axis on my waveform table to show run time that is to say whenever I start the program I should have 0 as the starting point

    How can I set the time axis on my waveform table to show run time that is to say whenever I start the program I should have 0 as the starting point. I've been messing around with the without success. I'm under Labview 2012.

    Thank you!

    Townes wrote:

    I can't understand what you mean. I have no formal training with labview. It took me a long time to write the simple program that I joined. Any guidance would be greatly appreciated!

    Its pretty normal for a beginner to take the time to write code. Right-click the map of waveform > Create > property node > historical data, you will get a property node, keep this at the beginning of the code and create a constant. You can also go to the VI properties and > run and select "clear indicators when it is called.

    I recommend you to go through the basic materials of LabVIEW which will give you an understanding on the basics of bases/components of LabVIEW.

  • How can I display the time of the data stored in a file using labview?

    How can I display the time of the data stored in a file using labview?

    Hi Matt,

    I think that we will need a little more information as to how you capture the data, what data you capture, etc.

    If you capture a waveform, is to extract the time data waveform which includes the t0 and dt values, so you can understand the time stamp of a specific data point as in the image below.

  • When I m I look at an image or another document, after a time (short term) the screen go to the home page, how can I change the time if I don't have this problem?

    When I m I look at an image or another document, after a time (short term) the screen go to the home page, how can I change the time if I don't have this problem

    Hi, Romulo,

    This question should be validated in the Internet Explorer Forum.  Note the drop-down menus.

    http://answers.Microsoft.com/en-us/IE/Forum

    What sites you encounter the problem with?

    Make sure flash player is the current version

    http://www.Adobe.com/software/Flash/about/

    Check Shockwave player is the current version

    http://www.Adobe.com/Shockwave/welcome/

    Check the Java version

    http://Java.com/en/download/installed.jsp

    You check the internet connection

    If you are experiencing network connectivity problems in Internet Explorer, the first thing to do is to make sure that all cables are connected. Then open Network Diagnostics by right-clicking the network icon in the notification area, and then click diagnose and repair (if you use Windows Vista) or solve problems (if you use Windows 7).

    If the problem persists, see the following articles:

  • How can I change the time for windows live?

    How can I change the time for windows live?

    This is the message I get. I need to change to continue working with this program.

    Hi stevenwiley,

    1. when exactly you get this message?

    2 are you facing any problem with Windows Live?

    If this happens only with a Windows Live program, you can post your request in the Windows Live forum for assistance.

    Check the link for Windows Live support:

    http://windowslivehelp.com/

    Hope this information is useful.

  • I signed on XP Pro SP3 as an administrator but you cannot change the timing of Windows Update to 03:00. All options are not enabled. How can I change the time, updates are made? __

    I signed on XP Pro SP3 as an administrator but you cannot change the timing of Windows Update to 03:00.  All options are not enabled.  How can I change the time that updates are made?

    Hi imoffshore,

     

    Welcome to Microsoft Answers Forums.

    We would like to get some more information from you to help solve your problem. You better, please answer the following questions.

    ·         When was the last time it worked?

    ·         Remember to make changes to the computer recently?

    ·         You have security software installed on the computer?

    ·         You get the error message?

    When you open the tab automatic updates in the control panel or My Computer property sheet, all options of configuration of the automatic updates may be grayed out. This happens due to one of the following reasons:

    1. You are not logged as administrator (or equivalent)
    2. Strategy of automatic updates is enabled
    3. Automatic updates (and Windows Update) access is blocked by group policy

    The options available for automatic updates.

    You must make some changes in the windows registry.

    Important: this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

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

    • Click Start, run and type REGEDIT to . EXE
    • Go to this location:

    HKEY_LOCAL_MACHINE-SOFTWARE-policies-Microsoft-Windows------WindowsUpdate------AU

    • In the right pane, delete the two values AUOptions and NoAutoUpdate
    • Go to this location:

    HKEY_CURRENT_USER-SOFTWARE-Microsoft-Windows-CurrentVersion------policies------WindowsUpdate

    • In the right pane, delete the DisableWindowsUpdateAccess value

    Using the Group Policy Editor - for Windows XP Professional

    • Click Start, run and type gpedit.msc
    • Navigate to the following location:

    => Configuration of the computer
    ==> Administrative templates
    ===> Windows components
    ===> Windows Update

    • In the right pane, double-click Configure automatic updates and set it to not configured
    • Next, go to this location:

    => User configuration
    ==> Administrative templates
    ===> Windows components
    ===> Windows Update

    • In the right pane, set to remove access to all Windows Update features on not configured

    Change how Windows installs or notifies you of updates

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-how-Windows-installs-or-notifies-you-about-updates

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I reset the time

    Hello

    The function of the program was to indicate the elapsed time. When the program has been run and the switch set to true, the indicator showed the elapsed time. And then move the button to false, the stop indicator to indicate the elapsed time. How can I reset the time elapsed to indicate the time elapsed since 0 when the button switch again without pressing the button "stop"? The program is attached. Thank you.

    From your description, it seems that your code is way too complex. -What are you really trying to do?

  • Sleep Timer Pavillion DV 7 - How do you set the timer for a different time setting?

    Sleep Timer Pavillion DV 7 - How do you set the timer for a different time setting?

    Hello Pidcock,

    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.

    I understand that you want to change on your computer sleep timer. I'll be happy to answer that question for you. Now you have not specified what operating system you are using, so I guess it's the same operating system provided with your computer (Windows 7). I will provide you the HP support document: Management of power (Windows 7 and Vista) Options, which will guide you in how to set the power of your laptop. Just in case you have upgraded to Windows 8 I am also including the HP Support document: Manage the power (Windows 8) Options. This document will guide you through the same steps in Windows 8.

    I hope that I have answered your question to your satisfaction. Thanks for posting this question on the Forums of HP. Have a great day!

  • How can I reset the time and date on Windows Vista?

    How can I reset the time and date on Windows Vista

    http://www.ehow.com/how_2056384_change-date-time-Windows-Vista.html

    http://www.Vistax64.com/tutorials/114989-date-time-change.html

    Read the information in one of the links above.

    See you soon.

    Mick Murphy - Microsoft partner

  • This sucker is fast. How can I extend the time, the bios displays the initial startup screen?

    I sometimes want to fool around with the bios and other items in the first startup screen, but it does not display still long enough for me to recognize the function related to the options keys.

    How can I extend the time that is displayed?

    Please to identify your computer.

    Ook from Lto the base/back/side of the pc/laptop to the sticker with barcode.

    Item number of pole 2 as seen on the following example of label with barcode of a HP laptop. The barcode on your HP product may be slightly different in appearance, but will still have important information necessary for us to help you.

    #Don't post not the serial number, as it is personal information. ###

    Display the version of the operating system installed (and whether 32 or 64 bit) and if the CPU as a product AMD or Intel

    Not showing information as requested will delay our responses and troubleshooting slow the question that led you to create a thread.

    Normally the F10 is the key used to enter the BIOS of a PC HP. Begin to type the F10 key as soon as your press the power button

    Best regards

    ERICO

  • How can I set the time on the toolbar of the low wing? When I click on the taskbar do a right-click and then click Properties, it does not give me the option to display the time?

    How can I set the time display on the toolbar of the low wing?  When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time?  Where should I go in windows 7 to do this?  I clicked on the date and time also, and it does give me an option to add there either. Please help.

    Thank you

    How can I set the time display on the toolbar of the low wing?  When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time?  Where should I go in windows 7 to do this?  I clicked on the date and time also, and it does give me an option to add there either. Please help.

    Thank you

    Right-click the taskbar, and then select Properties. On taskbar you of the tab, click Customize. Scroll to the clock and change the "behaviours" on it.

  • How can I change the time to download files using Adobe send? Adobe SendNow had a lot more options.

    How can I change the time to download files using Adobe send? Adobe SendNow had a lot more options. I see not nay with Adobe send.

    It is not a feature in Adobe send for the establishment and the date of end of availability of a file. At any time, you can unshare the file, however.

  • Timeline question on how I can change the time in a loop for

    In the following code segment:
    for(index in [0..3]) Timeline
    {
        keyFrames:
        [
            KeyFrame
            {
                time: 0s
                values: cars[index].translateX => 0
            }
            KeyFrame
            {
                time: 15s
                values: cars[index].translateX => 800 tween Interpolator.LINEAR
            }
        ]
    }.play();
    How can I make the time to be 15 + 2 * index seconds, for example, instead of 15 s always?

    Any input would be greatly appreciated!
    Thanks in advance!

    I imagine something like (not tested)

    var duration: Duration;
    var tmp = bind index on replace {
       duration = Duration.valueOf((15 + 2 * index)* 1000);
    }
    :
    :
    KeyFrame
    {
       time: bind duration
       values: cars[index].translateX => 800 tween Interpolator.LINEAR
    }
    

    To get help sooner, after a NBS.

    Note that I'm not JavaFX and the suggestion is the API reading.

    DB

    Edit you get coffee and complete your registrations pending. Answering questions on a forum should be identified as such, for those who come across them in a search.

    Published by: Darryl Burke

    Published by: Darryl Burke - added the necessary: between the lifetime and the

  • How can I get the time and date appears on a sony cyber-shot camera

    How can I get the time and date appears on a sony cyber-shot camera

    Hi terpmarty,

    What is the model number of the Sony Cybershot camera?
    Instructions for superimposing the date and time are model specific. Some models do not have the ability to superimpose the date and time too. In such a case, you can use the supplied software Picture Motion Browser (PMB) or PlayMemories home (WPH) (Compatible with the Windows operating system) to print the date and time on pictures.

Maybe you are looking for