Application Development 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: 

Show date

Former Member
0 Kudos

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

Former Member
0 Kudos
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

Former Member
0 Kudos

Make the month field as Numeric

rahulkavuri
Active Contributor
0 Kudos

Take the field as a string


var = str+2(1).

if var <> '.'.

MESSAGE E000 "Enter correctly".

endif.

Former Member
0 Kudos

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