2 Replies Latest reply: Apr 16, 2013 7:05 AM by Howard (... in Training) RSS

    ORA-01830: date format picture ends before converting entire input string

    BKing
      I am really stuck on this error. I'll try to explain how I am getting it.

      I am trying to make a calendar that when you click on a day a new screen pops up with a radio button group and each button corresponds to an hour of the day. Selecting one of the hours means you are registered for that hour. For example clicking on April 10th would bring up something like this:

      o 10-APR-2013 07.00.00 AM
      o 10-APR-2013 08.00.00 AM
      o 10-APR-2013 09.00.00 AM
      o 10-APR-2013 10.00.00 AM
      ... etc (each 'o' is the button)

      This list is generated from a static list of values like this:

      display value..................| return value
      &P5_TIME. 07.00.00 AM | &P5_TIME. 07.00.00 AM
      &P5_TIME. 08.00.00 AM | &P5_TIME. 08.00.00 AM
      ... etc

      The source of this page item is database column TIME with a format of TIMESTAMP(0). Format mask of DD-MON-YYYY, default value of to_date(:"P5_TIME_TMP",'DD-MON-YYYY');.

      Is there is anything I can tell you to be able to help? I can see that I have a valid timestamp format but I am missing something, or having too much of something...
      And by all means, if there is an easier way of doing something like this let me know.

      Any help is appreciated,
      B King
        • 1. Re: ORA-01830: date format picture ends before converting entire input string
          TexasApexDeveloper
          So you have a page that has a radio button for EACH hour in a DAY? As apposed to using a List of Values to allow the user to select from? Or even a shuttle??

          Please tell me this is April 1st all over again....

          Thank you,

          Tony Miller
          LuvMuffin Software
          Ruckersville, VA
          • 2. Re: ORA-01830: date format picture ends before converting entire input string
            Howard (... in Training)
            Hi,

            Re:
            The source of this page item is database column TIME with a format of TIMESTAMP(0). Format mask of DD-MON-YYYY, default value of to_date(:"P5_TIME_TMP",'DD-MON-YYYY');.
            The ' "P5_TIME_TMP" ' in this expression doesn't seem right to me. Shouldn't it be just :P5_TIME_TMP? There may be other problems, but why not try this to_date(:"P5_TIME_TMP",'DD-MON-YYYY');. in SQL Workshop > SQL Commands to see what you get? Make it work there first.

            Howard

            Well, let me add more. You are probably familiar with this error. In this case, it means the conversion could not find "DD-MON-YYYY" type data in your variable/expression. So, I think of two possibilities: 1) The data is not what you think it is so you need to display it to see exactly what it is. Or, 2) the expression specifying the data is not what you want / expect. In this case, I think 2) is true. I often run these code pieces in the SQL Commands window so I can see exactly how they are working / not working in APEX.

            Edited by: Howard (... in Training) on Apr 16, 2013 7:59 AM