cancel
Showing results for 
Search instead for 
Did you mean: 

Date format in SMART FORM.

Former Member
0 Kudos

Hi Friends,

CONCATENATE LYEAR2(2) BUDAT4(2) BUDAT+6(2)

INTO DATE1 SEPARATED BY SPACE.

Out put – 07 02 21 (YY MM DD)

My requirement is –> YY MM MM (5 spaces in between YY MM and DD) in SMART FORM.

How can I achieve this requirement. Please help.

Thanks in advance.

Sanju.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

CONCATENATE LYEAR2(2) ' ' BUDAT4(2) ' ' BUDAT+6(2)

INTO DATE1 SEPARATED BY SPACE.

Put 4 spaces in quotes that are shown...since one space will already b added

Hope dis helps..

Reward all helpful ans

Former Member
0 Kudos

Hi Sanju,

Try this code

data: yy(2) type c,

mm(2) type c,

dd(2) type c,

date(16).

yy = '07'.

mm = '02'.

dd = '21'.

date = yy.

date+7(2) = mm.

date+14(2) = dd.

And date stores yy(5spaces)mm(5spaces)dd.

Regards.

Former Member
0 Kudos

Hi,

Try,


CONCATENATE LYEAR+2(2) '  ' BUDAT+4(2) '  ' BUDAT+6(2)
INTO DATE1 SEPARATED BY SPACE.

The statement will put one space between each element, if you want more than that use spaces between quotes to increase the gap.

Regards,

Nick