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: 

date format

Former Member
0 Kudos
67

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

Simha_
Employee
Employee
0 Kudos
49

Hi,

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

Then print x(2).

It displays ur date.

Cheers,

Simha.

Former Member
0 Kudos
49

hi simha,

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

Former Member
0 Kudos
49

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