Hour field

I want to store the hour in a separate field in this format 19:00
Which could be the best way in order to store and query the data from that field?
thanks in advance.

Hi,
Dario wrote:
I want to store the hour in a separate field in this format 19:00
Which could be the best way in order to store and query the data from that field?That depends on what kinds of queries you'll want to do, and how you'll want to manipulate the data.
INTERVAL DAY TO SECOND was designed for storing time durations.
Will you ever need to take averages of these hours, or muliply an existing time by some other value? Then NUMBER might be miore convenient.
At any rate, a string (such as VARCHAR2) is probably niot a good idea. You'd be able to display and ORDER BY the vlaue, but not much else.

Similar Messages

  • Creating an Hour field in an SQL Query CUIC v10.0

    I am trying to create a report that shows the calls offered etc by Hour, instead of by half hour or 15 minutes which comes with the usual DateTime (interval) query.
    I am using DATEPART (Hour, DateTime) As Hour  and whilst this is giving me the hour number in the new column, I an showing 2 rows per hour as per the half hour interval.
    I have included it in the Group By and this makes no difference, Whilst I can group them by hour and that would in effect solve the issue, I then loos the Date Field!
    Ideally what I would like to see in 1 column is
    Call Type 1    4/2/15 10:00 AM
                          4/2/15 11:00 AM
                          4/2/25 12:00 AM
    etc.....
    Instead what I have is
    Call Type 1    4/2/15 10:00 AM         10
                          4/2/15 10:30 AM         10
                          4/2/25 11:00 AM         11
                          4/2/25 11:30AM          11
    etc...
    If there is anyone out there that can help I would be most grateful
    Thanks Sarah

    Sarah,
    You will need to make sure you remove "DateTime" from your GROUP BY clause, and from the SELECT statement.
    Instead of using DATEPART, I would use something like:
    DateTimeHour = DATEADD(h,DATEDIFF(h,0,DateTime),0)
    The above will give you a full DateTime value, rounded down to the nearest hour. Don't forget to include it in the GROUP BY (and probably SORT BY).
    You can add "DateTime" back as Filter Field in CUIC after you do the initial Create Fields step (look on the Fields page). Filtering on DateTime instead of DATEADD(h,DATEDIFF(h,0,DateTime),0) should make for a more efficient SQL query.
    -Jameson

  • ESS Expenses Add a new field

    Hi All,
    I have to add a field to "Mileage Details" screen of "Create a New Claim" in ESS 1.0 and it is a Java Webdynpro. Can somebody point to any info about travel/expenses tables, customising them, customising webdynpro screens for expenses and so on.
    Thanks for your help,
    Regards,
    Rajit

    There is DEFINE FIELD SELECTIION
    Sm34 > VV_PT_FLDSEL_NAM
    Ptarq> Customising> Service Specific Settings > Workinmg time >
    layout of Web application > Define Field Selection
    and add these fields to teh absence in which you want tpo appear using V_t554s_web
    Also regarding the clocks times
    Unfortunately there is no setting available, You can use feature
    HRSIF for this functionality. Please read the feature documentation
    and check customisation in V_PTRAQ_PROCESS.
    Depeding on your requirement you can decide how to use
    PT_ARQ_REQUEST_CHECK ie hours field or the clock times.
    That means you need to clear the time fields which are derived
    from the work schedule and keep it empty since these fields
    are hidden in your front end and no option for the pernr to modify
    or correct the times.

  • FMLA standard hours infotype 2001 not editable when working with date range

    Hi All,
    The issue described below arises at the Juncture between FMLA Workbench and Absence Infotype IT2001.
    When we try to tie a FMLA Request to Absences the process takes us to the Infotype PA2001 screen wherein we would like the Absence Hours Field to be Editable so that we could enter Hours (less than full day).
    The process works fine when the FMLA absence is for a single day, i.e. if an employee availed a FMLA leave on a day (whether full day or part of a day) the Absence Hours field (PA2001-STDAZ) is editable and the user can enter any number of hours of his choice.
    But the process faces a glitch when the FMLA absence spans over a period of time (i.e. an employee availed a FMLA leave for over a period wherein each day may or may not be a full day absence, in this scenario it would be best if the system allow the user to enter Absence Hours so that the User could enter the exact number of Absence hours correctly. But unfortunately, when an absence spans multiple days the Infotype 2001 screen dynamically turns the Absence Hours field (PA2001-STDAZ) uneditable (grayed out) and the system forcefully enters hours equal to the sum of the work schedule hours for each working day covered in the span of period for which we are trying to enter FMLA Absence Hours.
    I have used the USER EXIT and the BADI route and tried to change the Screen Table to editable, but with no luck.
    Wondering, if anyone of you could help me out of this glitch.
    Thanks in Advance.

    Hi,
       I don't think this is possible.
       You cannot make the Hours field editable for a date range.
       I don't think its feasible to enter absence hours on a day basis given a date range.
       Better think of creating a custom infotype to enter absence hours .
       (Design would be : based on the date range entered , say 01.01.2011 to 05.01.2011 , you should get five input enabled
         boxes(dynamically) for five days to enter the absence hours , this is not possible in standard infotype ..... )
    Regards,
    Srini.

  • Custom 2-week timecard layout not saving hours on 2nd Monday on 2nd row

    We have a custom timecard layout, based on the projects and payroll layout, that moves the comments from the details page to the front page after each day's hours field.
    It is working fine when used with a one-week timespan, but for 2 weeks, there is a strange problem. If you enter row 1 with no hours on the second Monday, then try to enter row 2 with hours on the second Monday, it will not save those hours. Instead, the hours are erased and the field blanked out.  It will save hours on other days, but not the second Monday.  Also, if you hit Continue, the hours are blanked out on the second Monday.
    Anyone else experienced this?

    Yes, thanks, I have found it.
    Independently, I discovered the problem with the timecard. In the two week format, the second Monday hours input element had an ID of B2822, which was the same ID of the comments for the second Tuesday.
    The sequencing for the ids for the hours input fields is B2210 .. B2227, B2228, B2229 etc.
    The sequencing for the ids for the comments input fields is B2810, .. B2821, B2822, B2823, etc.
    It would appear in our case that when the timecard layout is generated, the second Monday on the second row gets an ID of B2822 when it should be B2228, which seems to be a typo somewhere.
    Once I understood the problem, following Ramu's suggestion that it was a known bug, I was able to search metalink using the search term 'OTL hours not saved' and found patch 6368806, which addresses a similar problem with a different layout. I will post an update if that patch resolves the problem.
    Note:467906.1 and Note:467483.1 have more information.

  • JOIN TO FIELDS TO CREATE A NEW FIELD NAME

    Dreamweaver MX / MySQL / PHP
    I'm currently working on a DYNAMIC DROPDOWN SEARCH for a
    recruitment company Where the visitor selects either "ANNUAL" or
    "HOURLY" in the first menu and the second menu changes to either
    £10,000 0r £4.50 for the wages section.
    I can make the second menu change dynamically after the first
    menu is defined, but the ID given to the second menu (by me) means
    that it only ever searches the Hourly field or the Annual field but
    not both. Let me explain...
    I have a Jobs table and a salary table. Two fields in the
    Jobs table are HOUR and ANNUAL and these are inserted using a menu
    list drawn from a salary table. Its very easy to insert the data
    into the Jobs table - click on the HOURLY menu, select the figure
    and insert it into the HOUR field and then complete the process by
    inserting the relevant figure into the ANNUAL field. The problem
    lies in a customer search on the Public side,
    I want the visitor to choose either HOUR or ANNUAL when
    searching. I can do this using a dynamic dropdown menu (an MX
    Extension) THE FIRST MENU is selected and then the second menu
    changes to either the Annual or Hourly figures. BUT!!! I can only
    give one ID to the second menu which is.....
    S_jobHourly or S_jobAnnually
    So it works to a degree - if I make the second menu's ID
    value S_jobHourly it will return all the hourly figures chosen by
    the user. But if the user clicks ANNUALLY then it returns nothing
    because there are no hourly rates = £10,000.
    Is there a way to perhaps join these two fields in a
    recordset and then give that join a new name? So I could say name
    the result S_jobSum and that means that the second dropdown menu
    (given the value S_jobSum) would search both £10,000 and
    £4.50 and then return the Job which matches?
    Hope this is clear.
    I'm really close on this and any help on this would be
    absolutely fantastic.
    Many thanks
    Hurst

    Hi there
    I'm wondering if it would be easier to dynamically change the
    Label Value of the second drop down menu.... is that possible?
    i.e "If first menu content = "Hourly Wage" then second label
    id = S_JobHourly but if content is pulled from "Annual Wage" then
    label iD = S_jobAnnually. A dynamic id label for the second
    dropdown menu would solve this perfectly.
    Any Ideas?
    Thanks
    Hurst Vanrooj

  • Summarizing a formula field

    Newby question..
    I have a formula field labeled hours and consist of
    {CSC_SES3_WOI_WII_Work_Order_Join.csc_dec_estimated_hours}  *  DistinctCount ({CSC_SES3_WOI_WII_Work_Order_Join.csc_dec_estimated_hours}, {CSC_SES3_WOI_WII_Work_Order_Join.Summary})
    This is in the Group Footer 2 field.
    I now need to get a total of the hours for all the groups and put into group footer 2 field.   I can not seem to be able to add all the group footer 2 entries for hours.
    I know this should be simple, any help is appreciated
    Crystal reports 2008
    Thanks again,
    brandi

    Amr,
    Thank you for your quick response however I did add another group then added the formulated field to that section.  It is only calculating the last entry from group footer 1
    So i have a formula field (@hours) in Group Footer 2
    I created Group Footer 1 and put the same formula field (@hours) in that section. 
    My report has about 4 records in it and is like this
    Group Header 1  = Group 1
    Group Header 2 = Information of a group of tickets including a field estimated hours
    Details = details multiple entries
    Group Footer 2 = a Distinct Count field and the formula field (@hours)
    Group Footer 1 = (@hours) field
    In Group Footer 2 I have only 2 group 2 entries.
    example.
    150
    170
    In Group Footer 1 it is calculating just
    170.  Instead of adding the 2 entries together

  • Hide field infotype 2012

    Dear Guru's
    I want to hide the hours  field in infotype 2012 if subtype X is created. The modulepool is for V_T588M is MP200000 and the screennumber 2550. We created a Z1 screenvariable were we set the field to hide.
    However there is no special feature for IT2012. Which feature should I use for this settings.
    I tried feature P2011 adding the following tree:
    IF MOLGA 05
    INFOTYPE 2012
    Subtype is ZT99
    returnvalue is Z1
    ELSE
    blanco
    But does not seem to work correct. Help needed.
    Kind regards.
    Stephan

    Hi
    It's hard to tell without actually seeing what you've done, but the process is OK anyway.
    What you could do to test if your feature works OK (if you have basic knowledge on debugging) is to set a breakpoint in the standard function module HR_FEATURE_BACKFIELD (which is the Function Module that evaluates the feature based on the current data) and check whether it returns your Z1 code or not.  If it does return your Z1 it should take what you have entered in T588M and hide that field, check that.
    Besides that, make sure there's no active BADI that set this field visible, 'cause if there is one doing this, no matter what you do on T588M it will always show the field.
    If you're still not able to do it, you can always create your own BADI implementation and hide that field given the conditions you need (you can tell your Abaper to do that)
    Hope this helps.
    I just noticed that even if you are able to hide the field 'Hours' using the feature, you won't be able to hide the label 'Hours' next to it as well (since this element doesn't have the appropiate groups that would allow to customize it via T588M)
    So, bottom line, you definetely need to go for a BADI, which by the way it would be very simple:
    method IF_EX_HRPAD00INFTY~BEFORE_OUTPUT.
        check INNNN-infty eq '2012' AND
              INNNN-SUBTY EQ 'ZT99' AND
              I001P-MOLGA EQ '05'.
      LOOP AT SCREEN.
        IF SCREEN-NAME CS 'P2012-ANZHL' OR
           SCREEN-NAME CS 'ANZAHLTEXT'.
          SCREEN-ACTIVE = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    endmethod.
    Edited by: Jose Maria Otero 5 minutes later

  • Entering events in 24 hour format

    I use the 24 hour clock on my computer. When I enter a new event, and enter the time, it's extremely frustrating to enter it. For example, if I want to enter an event at 1900 (7PM), and I enter 19, into the hour field, it shows 09, if I enter 7, it shows 7AM and then I have to use the keyboard up and down arrows 11 times. Is there a trick to entering 24 hours format times without having to use the up and down arrows to change the time?

    I had a similar problem with one of my other applications: Now Up-to-Date & Contact.
    The answer for that was:
    "Your post caused us to look at this again. I confirmed from before that if I change the format (System Preferences->Date & Time->Open International, Formats), then set the time to be the 24 hour clock, NUD is not using that format.
    However, if I first set the Region to be "United Kingdom", in NUD the 24 hour clock is supported. If I don't like the UK default settings, I can further customize them to use the US Dollar, reformat to month/day/year (rather than day/month/year), etc. If I start with the US region and then change to the 24 hour clock, NUD doesn't recognize the format change. "
    Source = http://forum.nowsoftware.com/content/viewtopic.php?f=31&t=938

  • Table: Span field over several rows

    Hi,
    It would like to display the entries in a table each in three lines
    +-----------------------------+------------+---------------+----------+----------------------+
    | Field 1                     Pause     Traveltime   Hours   Field 5             |
    |                                Task                                    Location           |
    |                                Description                                                  |
    +-----------------------------+------------+---------------+----------+----------------------+
    Is it possible to span one cell over several rows?
    Greetings, Vanessa

    Hi Vanessa,
    If you not really need a table, but more a tabular layout, you may consider using the RowRepeater control.
    This way you have total control how your 'rows' look like. You could for instance use a VerticalLayout in a RowRepeater cell to allow 3 items in a vertical layout.

  • Import payroll hours from INF 2002 to table TIP

    Hi Gurus,
    is it possible to update number of hours field in TIP table according to Payroll Hours from infotype 2002 ?
    or :
    let's say i've created rounding rules AA in V_T559R
    can i call that rounding rules AA from PCR ? coz i read this in OPET ROUND documentations :
    Syntax Variant 2                                                                               
    OOOOOxynn                                                                               
    OOOOO       ROUND       Name of operation                                                                               
    x                       Rounding type                                
                              Use as in variant 1                                                                               
    nn                      Rounding rule                                
                  nn          nn represents the 2-character rounding number
                              from the "Rounding Rules" view (T559R).                                                                               
    Procedure                                                                               
    Times are rounded according to the rounding rule from the "Rounding  
      Rules" view (V_T559R). You can define as many rounding rules as you  
      require in this view.                                                
    what should i do?
    thanks b4

    In a PCR, operation FILLPN will update the number of hours field of the current TIP entry with the current value in the HRS variable.
    Is that what you mean?
    Regards
    Simon

  • 7 hours absence hours

    Hi All,
    1. I have created 5.25 hours daily work schedule on wednesday and thursday and 8.75 daily work schedule on friday. Monday, tuesday, saturday and sunday are off.
    2. When I create absence on thursday, system is showing 8.75 absence hours. but I want to show 7 hours in IT 2001.
    Please anybody help me, where I need to do changes for getting 7 hours in IT 2001.
    Regards
    Siri

    Hi,
    As the working hrs on Thursday are 8.75 system will show 8.75 only. You can manually enter 7 in absence hours field.
    And if you want those 7 hrs to come automatically put 80% (instead of 100%) in the hrs quota multiplier field in the counting rule.

  • Working hour in assignment window

    Hi all
    Which table contains the working hour field??. I will find out which employee how many hours per week working.
    Thanks

    It is stored in per_all_assignments_f
    select normal_hours
    from per_all_assignments_f
    where assignment_number = :asg_num
    and sysdate between effective_start_date and effective_end_date

  • Calculating a field

    Hello, I am trying to complete a form, and I need to total of fields but its gotta be able to have text. Can I do that? If I was to change it to a numeric field, it wants to add comas and also calculate every digit. Help please.....

    Linda,
    You will want to select your "total" field, and choose the calculate event from the script editor. In the calculate event your will want to put the following javascript:
    this.rawValue = hours.rawValue * 80;
    Where hours is the hours field on your form (including the path in the hierarchy, if needed). The calculate event will fire as soon as you leave the hours field when filling in the form.

  • Exception on read or set UDF document lines value

    Hi All,
    have a big problem...
    I'm creating invoice documents from many and many delivery documents via DI API.
    In some cases, my addon gives an exception reading or setting UDF line fields.
    Here is the exception message:
    System.Runtime.InteropServices.COMException (0x80010105): The server has rise an exception. (Eccezione da HRESULT: 0x80010105(RPC_E_SERVERFAULT))
    in SAPbobsCOM.FieldClass.get_Value() in Morato.CreaDocFatturazioneMassiva.CopyUDFLineFields(String)
    or
    System.Runtime.InteropServices.COMException (0x80010105): The server has rise an exception. (Eccezione da HRESULT: 0x80010105(RPC_E_SERVERFAULT))
    in SAPbobsCOM.FieldClass.set_Value() in Morato.CreaDocFatturazioneMassiva.CopyUDFLineFields(String)
    The strange thing is that if I create an invoices from a little quantity of deliveries, there is no problem. The error seems to rise when I create an invoice from a huge quantity of deliveries.
    The code is:
    Private Function CopyUDFLineFields(ByVal oLineNum As String) As Boolean
            Dim i As Integer
            oDocFrom.Lines.SetCurrentLine(oLineNum)
            Try
                With oDocFrom.Lines.UserFields
                    For i = 0 To .Fields.Count - 1
                        Select Case .Fields.Item(i).Type
                            Case SAPbobsCOM.BoFieldTypes.db_Date
                                '// campi di tipo data
                                Select Case .Fields.Item(i).SubType
                                    Case SAPbobsCOM.BoFldSubTypes.st_Time
                                        '// campi di tipo ora
                                        If Hour(.Fields.Item(i).Value) <> "0" Or Minute(.Fields.Item(i).Value) <> "0" Then
                                            oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value
                                        End If
                                    Case Else
                                        If Year(oDocFrom.Lines.UserFields.Fields.Item(i).Value) <> "1899" And Year(.Fields.Item(i).Value) <> "1999" Then
                                            oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value
                                        End If
                                End Select
                            Case SAPbobsCOM.BoFieldTypes.db_Float
                                '// campi di tipo unità e totale
                                If .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Measurement Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Percentage Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Price Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Quantity Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = CDbl(.Fields.Item(i).Value)
                                End If
                            Case SAPbobsCOM.BoFieldTypes.db_Alpha
                                '// campi di tipo stringa
                                If Not String.IsNullOrEmpty(oDocFrom.Lines.UserFields.Fields.Item(i).Value) Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                                End If
                            Case SAPbobsCOM.BoFieldTypes.db_Numeric
                                oDocTo.Lines.UserFields.Fields.Item(i).Value = Val(.Fields.Item(i).Value)
                            Case SAPbobsCOM.BoFieldTypes.db_Memo
                                oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                            Case Else
                                '// altri tipi stringa
                                If Not String.IsNullOrEmpty(oDocFrom.Lines.UserFields.Fields.Item(i).Value) Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                                End If
                        End Select
                    Next i
                End With
                Return True
            Catch ex As Exception
                SBO_Application.MessageBox(ex.ToString & " - " & oDocFrom.Lines.UserFields.Fields.Item(i).Name.ToString)
                Return False
            End Try
        End Function
    Anyone have experienced something similar?
    Kind Regards,
    Paolo Caricasole.
    Edited by: Rui Pereira on Dec 23, 2008 4:26 PM

    Please refer to note#1235603
    SAP Notes: [http://service.sap.com/notes|http://service.sap.com/notes]
    Replace:
    oDocTo.Lines.UserFields.Fields.Item(i).Value
    with:
    Document_Lines oLines = oDocTo.Lines
    oLines.UserFields.Fields.Item(i).Value
    Regards, Yatsea

Maybe you are looking for

  • NetBeans 5.0 and Tomcat 4.1

    Hello, I'm using NetBeans 5.0 and I have been using the Bundled Tomcat version 5.5.9 for my servlet container and everything's been great. Now that I'm ready to push my application up to a web host, I found that my host (lunarpages) runs with Tomcat

  • Error message When Synching

    Help....getting error message when syncing...."Intellisynce - Unable to read application data".....does synch my Outlook contacts. Any ideas on how to fix?

  • How can I stream videos that come into my imac directly to my AppleTV and then my TV

    how can I stream videos that come into my imac directly to my AppleTV and then my TV?

  • OBI Scheduler 10g reconfiguration

    Hi, We need to re-configure OBIEE 10g scheduler to point it to a new database schema. We have planned to run the schconfig utility and enter new database details for the reconfiguration. Also, we are going to create the scheduler tables in the new sc

  • Send all messages in Drafts Mailbox in Mail - How to do this in Automator?

    A MacUser only for 20 years, I've just moved from Eudora eMail to Apple's Mail program. One feature that I would like to have with Mail that I had with Eudora is the ability to "queue" a message (similar to putting the message into the DRAFTS mailbox