[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

3727.0. "Date, validation against current date" by GRANMA::RSHEINBERG (Reda,COP,DTN:339-5387) Tue Jan 04 1994 16:52

	Subject: Concerning date validation

	My customer wants to validate the date entered in the 
	REQUESTED_COMPLETION_DATE field on an entry form. That is later than
	the current date.

	...  field named date currently

	;;REQUESTED_COMPLETION_DATE;;

	/VALID=CAL$SET_DATE:"REQUESTED_COMPLETION_DATE"/LANGUAGE=NBS_DATE
 /POST="DATE_CONVERT REQUESTED_COMPLETION_DATE,REQUESTED_COMPLETION_DATE,2,2

	.. can I or how would I add the validation to assure field is greater 
	than current date OA$DATE?

	thanks,
	Reda
				
T.RTitleUserPersonal
Name
DateLines
3727.1How about ...IOSG::MAURICEI left my heart in AlcatrazTue Jan 04 1994 17:4423
    Hi,
    
    One way would be to add field post processing. Something like
    
    /POST='XOP ~~REQUESTED_COMPLETION_DATE_POST~~'
    
    on the field, and then:
    
    ;;~~REQUESTED_COMPLETION_DATE_POST~~;;
    
    .IF REQUESTED_COMPLETION_DATE NES ""
      THEN
        DATE_CONVERT REQUESTED_COMPLETION_DATE, REQUESTED_COMPLETION_DATE, 3\\
        DATE_CONVERT #REQ_COMPLETION_DATE_NBS, REQUESTED_COMPLETION_DATE, 7\\
        .IF #REQ_COMPLETION_DATE_NBS LES OA$DATE_NBS
           THEN
             OA$VAL_SET_INVALID\\\\
             OA$FLD_STAY REQUESTED_COMPLETION_DATE\\\\
             GET OA$DISPLAY = "You must specify a future date and time"
    
    HTH
    
    Stuart