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

date format

Former Member
0 Likes
443

hi,

in the date format,ddmmyyyy...how can i take the first two characters(dd) and display them in report programming?

thanks in advance,

shylaja.

3 REPLIES 3
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
425

Hi,

If ur date is stored in some variable , say x.

Then print x(2).

It displays ur date.

Cheers,

Simha.

Read only

Former Member
0 Likes
425

hi simha,

thank u very much.how do i print the month?

Read only

Former Member
0 Likes
425

Hi Shyalaja,

Remember one thing, internally SAP always stores the date in YYYYMMDD format, irrespective of how it gets displayed on UI.

When you debug, you will see this.

Hence if date field is V_DATE then

Year: V_DATE(4)

Month: V_DATE+4(2)

Date: V_DATE+6(2)

Hope this helps.

Regards,

Aditya