Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Show date

Former Member
0 Likes
525

Hi

i have a popup with a field to put a date but just the month and the year like this:

02.2006

know the user can put 1.2006 and the field accepts it, but i want to force the user to put 01.2006 and if he puts 1.2006 gives a error.

thanks

ricardo

4 REPLIES 4
Read only

Former Member
0 Likes
491
len = strlen(p_date).

if len LT 7.

  * display error.

endif.

or

mon = p_date+0(2).
len = strlen(mon).
if len LT 2.
   *display error
endif.

Message was edited by: Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
491

Make the month field as Numeric

Read only

rahulkavuri
Active Contributor
0 Likes
491

Take the field as a string


var = str+2(1).

if var <> '.'.

MESSAGE E000 "Enter correctly".

endif.

Read only

Former Member
0 Likes
491

hi

chk this out

data : str(7) value '2.2006'.

if str+1(1) = '.'.

concatenate '0' str into str.

endif.

write 😕 str.

plz reward if useful