7 Replies Latest reply: Apr 3, 2013 12:46 AM by HamidHelal RSS

    Date Format

    998698
      Dear Team ,

      pls tell me how i can put message on particular item whose datatype is date and format mask is DD/MM/RRRR that when i inserted a date greater than last day of that month .

      pls help.
        • 1. Re: Date Format
          HamidHelal
          995695 wrote:
          Dear Team ,

          pls tell me how i can put message on particular item whose datatype is date and format mask is DD/MM/RRRR that when i inserted a date greater than last day of that month .

          pls help.
          Hello 995695,

          Try this
          /*SAMPLE CODE  WITH SYSDATE */
          
          MESSAGE('The date should be '||TO_CHAR(SYSDATE,'DD/MM/RRRR'));
          MESSAGE('The date should be '||TO_CHAR(SYSDATE,'DD/MM/RRRR'));
          Hope this helps

          Hamid


          Mark correct/helpful to help others to get right answer(s).*
          • 2. Re: Date Format
            998698
            no idont want this this i know .

            pls tell me how can i put a condition means code for that.
            • 3. Re: Date Format
              HamidHelal
              995695 wrote:
              no idont want this this i know .

              pls tell me how can i put a condition means code for that.
              Try this
              IF :YOUR_DATE_FILED > LAST_DAY(:YOUR_DATE_FILED) THEN
              MESSAGE('NOT ALLOWED');
              MESSAGE('NOT ALLOWED');
              RAISE FORM_TRIGGER_FAILURE;
              END IF;
              you didn't keep track of your post.. Total Questions:      2 (2 unresolved)

              Hope this works..

              Hamid


              Mark correct/helpful to help others to get right answer(s).*
              • 4. Re: Date Format
                998698
                no this also dont work.

                i will explain u in details

                i m having :bl_dtls.start_date as a text item whose datatype is date and format mask is DD/MM/RRRR .

                this item is having variable dates.

                i m having three radio group options like add,modify,query.

                if i change the :bl_dtls.start_date of march month from 31/03/2013 to 32/03/2013 it should have to display message that 'Day must be between 1 and last of month'.

                tell me the code for to display above message depending on the above condition.

                pls help.....
                • 5. Re: Date Format
                  HamidHelal
                  995695 wrote:
                  no this also dont work.

                  i will explain u in details

                  i m having :bl_dtls.start_date as a text item whose datatype is date and format mask is DD/MM/RRRR .

                  this item is having variable dates.

                  i m having three radio group options like add,modify,query.

                  if i change the :bl_dtls.start_date of march month from 31/03/2013 to 32/03/2013 it should have to display message that 'Day must be between 1 and last of month'.

                  tell me the code for to display above message depending on the above condition.

                  pls help.....
                  Hello,
                  Check your first post and this post. What you want and what you post. If you don't provide details information how can any one help you ?

                  Before posting on this forum please read

                  You said only one item name is *:bl_dtls.start_date* which can only hold one value. Then which column hold the 32/03/2013. More over second date is wrong and oracle date data type item will not allow this date or any invalid date.

                  you can say, when user input 31/03/2013 or any date in the :bl_dtls.start_date filed, which is not first date of the month and you would like to display message to put first date of the month then try this..
                  if :bl_dtls.start_date != LAST_DAY(ADD_MONTHS(:bl_dtls.start_date,-1))+1 THEN
                   MESSAGE('SHOULD BE FIRST DATE OF THE MONTH');
                   MESSAGE('SHOULD BE FIRST DATE OF THE MONTH');
                   RAISE FORM_TRIGGER_FAILURE;
                  END IF;
                  Hope it's clear..

                  Hamid


                  Mark correct/helpful to help others to get right answer(s).*

                  Edited by: HamidHelal on Apr 3, 2013 1:37 PM
                  • 6. Re: Date Format
                    998698
                    my F10 button is not working for saving the record...
                    pls help
                    • 7. Re: Date Format
                      HamidHelal
                      995695 wrote:
                      my F10 button is not working for saving the record...
                      pls help
                      Do you read my posted link ? Does we are talking about the above line or something else ? ;)

                      If your subjected problem is solved then mark this thread as answered with marking helpful / correct or both. For any other topic open a new thread.

                      Hamid

                      Edited by: HamidHelal on Apr 3, 2013 1:46 PM