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

Format Date in Sapscript

Former Member
0 Likes
606

Hi!

How can I set the format date in a sapscrit as?

M M D D Y Y Y Y

(With spaces and bold).

Thanks very much!

PD:

I put this, but appear the letter MMDDYYYY, not the date:

/: SET DATE MASK = 'MMDDYYYY'

C1 < B >&REGUH-ZALDT&< / >

1 ACCEPTED SOLUTION
Read only

Pawan_Kesari
Active Contributor
0 Likes
553
/: SET DATE MASK = 'M M D D Y Y Y Y'

will not work

try this instead

/: SET DATE MASK = 'MMDDYYYY'
/: DEFINE &DT& = &REGUH-ZALDT&
C1 &DT+0(1)& &DT+1(1)& &DT+2(1)& &DT+3(1)& &DT+4(1)& &DT+5(1)& &DT+6(1)& &DT+7(1)&

3 REPLIES 3
Read only

former_member242255
Active Contributor
0 Likes
553

You can try by taking a variable of size 15 and moving the date as per your format and writing in bold.

Read only

Pawan_Kesari
Active Contributor
0 Likes
554
/: SET DATE MASK = 'M M D D Y Y Y Y'

will not work

try this instead

/: SET DATE MASK = 'MMDDYYYY'
/: DEFINE &DT& = &REGUH-ZALDT&
C1 &DT+0(1)& &DT+1(1)& &DT+2(1)& &DT+3(1)& &DT+4(1)& &DT+5(1)& &DT+6(1)& &DT+7(1)&

Read only

Former Member
0 Likes
553

hi,

/: SET DATE MASK = 'MMDDYYYY'

C1 < B >&REGUH-ZALDT01(01)& &REGUH-ZALDT02(01)& ....

</>

Hope this solves your issue.