5 Replies Latest reply: May 29, 2013 1:39 PM by 982158 RSS

    Create an item type time

    982158
      Hi,I want to create an item type time and I must make a verification and I need to verify that the user has entered a time accepted.
      any propositions?

      Edited by: 979155 on 29 mai 2013 10:44
        • 1. Re: Create an item type time
          Amatu Allah Neveen Ebrahim
          Hi
          its not clear what u r trying to do...
          But if u r building a time attendance application then u have to set up the shifts or periodic time table in order to validate their actual attendance time towards the rules of work attwndance u have to set up.
          Recommended a date data type which includes both time & date internally.
          U will also need time in & out hence date of attendace.

          This is my proposal for what u explained.

          Good Luck :)

          Amatu Allah
          • 2. Re: Create an item type time
            CraigB
            It is always a good idea to provide your Forms Version! If you are using Forms 6i (6.0.8.x.x) or higher then you can set the Data Type property of your item to "Datetime". I don't have access to Forms 5 and earlier and I don't remember if these versions supported the "Datetime" data type, so you are using Forms 5 or earlier, you will have to use a standard Date data type and then set the format mask to restrict input to an acceptable time format (eg: HH24":"MI).

            Craig...
            • 3. Re: Create an item type time
              982158
              Sorry,I forgot to mention the version ...
              It's 10g..
              I want to create an item time (HH24:MI) and I must make a control for this item in " when-validate-item trigger" .
              • 4. Re: Create an item type time
                CraigB
                ... I must make a control for this item in " when-validate-item trigger" .
                I don't understand why you need code to validate the time entry when a Format Mask on the item will ensure only valid time's are entered. Do you need to check if the time is between a threshold or some other check not related to "is the time entered a valid time"? You can do this kind of checks in your When-Validate-Item (WVI) trigger using standard PL/SQL logic (>, <, <>, etc) as well as standard Date Functions.

                Can you be more specific on what you need to perform in your WVI trigger?

                Craig...
                • 5. Re: Create an item type time
                  982158
                  I will try the format mask :)