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: 

Reg : Function Module

Former Member
0 Kudos

Hi Friends,

Is tr any function module availble to convet the Date in DD-MM-YYYY format to system Date format(YYYYMMDD)?

Points will be rewarded for all helpful answer...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

do this way ...You don't need any FM for that


concatenate v_date+6(4) v_date+3(2) v_date+0(2) into v_final.

9 REPLIES 9

former_member206377
Active Contributor
0 Kudos

Hi,

Use CONVERSION_EXIT_PDATE_INPUT

Regards,

Vasuki

Former Member
0 Kudos

hi,

do this way ...You don't need any FM for that


concatenate v_date+6(4) v_date+3(2) v_date+0(2) into v_final.

Former Member
0 Kudos

Hi

There is some extra support for this in patch 30 described in note 816761. Here is an excerpt:

New date format customizing options from NW04 SPS12 & EP6 SP2 Patch 30

Other terms

Reason and Prerequisites

NW04 SPS12 and EP6 SP2 Patch 30

Solution

There are new options to define how certain date formats (date,

timestamp and time properties) will be formatted.

The following keys can be configured in:

Configuration / Global Services / Property Metadata / Properties /

Additional Metadata

-Format

Use DateFormat defined patterns, DateFormat.SHORT, DateFormat.MEDIUM,

DateFormat.LONG.

Documentation:

http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html

as values: long/medium/short.

Example: format=long results in

Date type -> 17 January 2005

Timestamp -> 17 January 2005 16:09:23

Time -> 16:09:23

-customFormat

To set a customer pattern according to documentation:

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

If the pattern is not correct, the default date format will be used.

Example: customFormat=dd.MM.yyyy hh:mm:ss -> 17.01.2005 04:09:23

I hope this is helpful.

PS: Do award points.

Former Member
0 Kudos

Hi ,

Use FM

CONVERT_DATE_TO_INTERNAL

Please reward if useful.

0 Kudos

hi friends,

all the fm's r not working... see my input format is DD-MM-YYY

i need it as YYYYMMDD

0 Kudos

Hi Sasikanth,

Try this .

Parameter: in_date(10) type C.

Data : out_date(10) type C.

CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'

EXPORTING

input = in_date

IMPORTING

OUTPUT = out_date

.

write : out_date.

Reward if useful

Regards,

Vasuki

GauthamV
Active Contributor
0 Kudos

hi,

check this function module.

CONVERSION_EXIT_PDATE_INPUT

input : 01012008

output : 20080101

Former Member
0 Kudos

Hi,

There are two function modules in which one converts to internal format and other converts to extranl format..

CONVERT_DATE_TO_EXTERNAL

CONVERT_DATA_TO_INTERNAL

check the function modules and it eases your problem.

Regards

Narin Nandivada.

Former Member
0 Kudos

Hi,

Either use FM or we can do it by coding.

CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
  EXPORTING
    input            =  p_date
 IMPORTING
   OUTPUT        =  lv_date.

here p_date = 24-06-2008

lv_date = 20080624

By coding

CONCATENATE lv_date+6(4) lv_date
+3(2) lv_date+0(2) INTO lv_date1

This will surely help you.

Plz reward if useful.

Thanks,

Dhanashri.

Edited by: Dhanashri Pawar on Jun 24, 2008 9:08 AM