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: 

day for the given date

Former Member
0 Kudos

Hi all,

Is there any FM available to find the day (Ex. Thursday) for the given date (08.05.2008).

Regards,

Shanthi

6 REPLIES 6

Former Member
0 Kudos

Use fm DATE_TO_DAY.


DATA : V_DATE LIKE SY-DATUM,
       V_DAY LIKE DTRESR-WEEKDAY.


 V_DATE = SY-DATUM.

CALL FUNCTION 'DATE_TO_DAY'
  EXPORTING
    DATE          = V_DATE
 IMPORTING
   WEEKDAY       =  V_DAY
          .

WRITE : V_DAY. 

Regards,

Santosh

former_member188685
Active Contributor
0 Kudos

USe the Function HRIQ_GET_DATE_DAYNAME,

Import parameters               Value

 LANGU                           E
 DATE                            20080508
 CALID                           01


 Export parameters               Value

 DAYNR                           4
 DAYTXT                          Thursday
 DAYFREE

former_member188685
Active Contributor
0 Kudos

You can check this Function also.

ISP_GET_WEEKDAY_NAME

Import parameters               Value

 DATE                            20080508
 LANGUAGE                        E
 WEEKDAY_NUMBER


 Export parameters               Value

 LANGU_BACK                      E
 LONGTEXT                        Thursday
 SHORTTEXT                       TH

Former Member
0 Kudos

Hello,

See the fm DAY_ATTRIBUTES_GET and WEEKDAY_GET.

Regards,

Former Member
0 Kudos

Hi,

Have a look on the following code

data: date1(10) type c.

CALL FUNCTION 'DATE_TO_DAY'

EXPORTING

date = '20080508' "sy-datum

IMPORTING

WEEKDAY = date1.

Reward,if useful.

Thanks,

Chandu