hello,
I have a string parameter which has an edit mask to accept date as dd-mon-yy . This is an optional parameter.
I have the following formula which formats the parameter
NumberVar dd;
NumberVar mm;
NumberVar yyyy;
StringVar text_mmm;
dd := ToNumber(Left ({?Docket End Date},2));
text_mmm := Mid ({?Docket End Date},4,3);
yyyy := ToNumber(Right ({?Docket End Date},4));
if text_mmm = "JAN"
then mm := 01
else
if text_mmm = "FEB"
then mm := 02
else
if text_mmm = "MAR"
then mm := 03
else
if text_mmm = "APR"
then mm := 04
else
if text_mmm = "MAY"
then mm := 05
else
if text_mmm = "JUN"
then mm := 06
else
if text_mmm = "JUL"
then mm := 07
else
if text_mmm = "AUG"
then mm := 08
else
if text_mmm = "SEP"
then mm := 09
else
if text_mmm = "OCT"
then mm := 10
else
if text_mmm = "NOV"
then mm := 11
else
if text_mmm = "DEC"
then mm := 12;
date(yyyy,mm,dd);
How can i avoid the formula to execute if no value is entered in the parameter.
Any tips are appreciated
I have a string parameter which has an edit mask to accept date as dd-mon-yy . This is an optional parameter.
I have the following formula which formats the parameter
NumberVar dd;
NumberVar mm;
NumberVar yyyy;
StringVar text_mmm;
dd := ToNumber(Left ({?Docket End Date},2));
text_mmm := Mid ({?Docket End Date},4,3);
yyyy := ToNumber(Right ({?Docket End Date},4));
if text_mmm = "JAN"
then mm := 01
else
if text_mmm = "FEB"
then mm := 02
else
if text_mmm = "MAR"
then mm := 03
else
if text_mmm = "APR"
then mm := 04
else
if text_mmm = "MAY"
then mm := 05
else
if text_mmm = "JUN"
then mm := 06
else
if text_mmm = "JUL"
then mm := 07
else
if text_mmm = "AUG"
then mm := 08
else
if text_mmm = "SEP"
then mm := 09
else
if text_mmm = "OCT"
then mm := 10
else
if text_mmm = "NOV"
then mm := 11
else
if text_mmm = "DEC"
then mm := 12;
date(yyyy,mm,dd);
How can i avoid the formula to execute if no value is entered in the parameter.
Any tips are appreciated