3 Replies Latest reply: Nov 18, 2012 9:36 AM by roots RSS

    How to get/display  time with minutes in a test item

    roots
      Dear experts,
      Forms [32 Bit] Version 10.1.2.0.2 (Production)
      Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
      Oracle Toolkit Version 10.1.2.0.2 (Production)
      PL/SQL Version 10.1.0.4.2 (Production)
      I've the following requirements.

      In my form, there are three text items and one save button.


      Text items named as

      No_of_days --> Number data type
      (user will enter number of days)

      hours_limit --> Char data type with format mask (HH:MI);
      (user will enter hours with minutes)

      Upto_date_time --> date data type;
      this field calculated as (No_of_days+hours_limit+sysdate)


      User will enter No_of_days or hours_limit:

      Based on the values I've to calculate Upto_date_time


      Here is the problem:

      1) If user doesn't enter hours_limit I want to show default time as " 04:00 PM"

      2) If user enter hours_limit field we should allow them to enter in the following format
      "HH24:MI" format;

      what whould be suitable data type for hours_limit field..
      I tried with char and i've set the format mask as ,
      set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');

      But I'm geeting the error

      "FRM-50027:Invalid format mask for given datatype"


      Please help to solve this problem,

      Regards,

      Karthi