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: 

How to deal with date

Former Member
0 Kudos

Hi all,

date is like sy-datum.

i want the date value should be 01.01.2006.

i want to take the year only year in the the date and month and day should be 01 and 01.

ex: date = 01.01.2007( if the current year is 2007)

please help me.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

DATA DATE LIKE SY-DATUM.

CONCATENATE SY-DATUM(4) '0101' INTO DATE.

Max

3 REPLIES 3

Former Member
0 Kudos

Hi

DATA DATE LIKE SY-DATUM.

CONCATENATE SY-DATUM(4) '0101' INTO DATE.

Max

Former Member
0 Kudos

hi sai

use FM CONVERT_DATE_TO_EXTERNAL

and then you can editmask the output to your format

Santosh

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

data v(10).

concatenate '01.01.' sy-datum+0(4) into v.

write v.