‎2008 May 27 12:05 PM
Hi,
Is there any function module to convert date from 5-12-2008 to 2008-12-05?
Please help ..
‎2008 May 27 12:06 PM
Hi,
Use these function modules for any date format conversions.
CONVERSION_EXIT_PDATE_INPUT,
CONVERT_DATE_TO_INTERN_FORMAT,
CONVERT_DATE_FORMAT,
CONVERT_DATE_TO_EXTERNAL,
CONVERT_DATE_TO_INTERNAL,
CONVERT_DATE_INPUT.
Regards,
Jagadish
‎2008 May 27 12:06 PM
Hi,
Use these function modules for any date format conversions.
CONVERSION_EXIT_PDATE_INPUT,
CONVERT_DATE_TO_INTERN_FORMAT,
CONVERT_DATE_FORMAT,
CONVERT_DATE_TO_EXTERNAL,
CONVERT_DATE_TO_INTERNAL,
CONVERT_DATE_INPUT.
Regards,
Jagadish
‎2008 May 27 12:15 PM
‎2008 May 27 12:18 PM
i dnt understand why you need to use a FM.
U can alwys use SYSTDATLO system variable to change the
date in internal format.
Hope it helps
‎2008 May 27 12:08 PM
is the form 2008-12-05 your internal system date?
then you can use SYSTTIMLO to convert it in internal format.
Also if you can check
RKE_TIMESTAMP_CONVERT_OUTPUT
Hope it helps
‎2008 May 27 12:08 PM
Hi,
Use the Function module CONVERSION_EXIT_PDATE_INPUT which Resolves your
Requirement.
Reward if useful.
Regards
Raj.
‎2008 May 27 12:09 PM
date_old = 2008-05-27
day = date_old+8(2)
month = date_old+5(2)
year = date_old(4)
concatenate day '-' month '-' year into date_new.
‎2008 May 27 12:12 PM
Hello,
you can use edit mask 'yyyymmdd'.
(or)
Check the below code :
data v_mdate(8) type c.
data : v_date(8) type c,
v_day(2) type c,
v_mon(2) type c,
v_year(4) type c.
start-of-selection.
v_mdate = '01012007'." to 20070101
v_year = v_mdate+4(4).
v_mon = v_mdate+2(2).
v_day = v_mdate+0(2).
concatenate v_year v_mon v_day into v_date.
write:/ v_date.
***************Reward points,if found useful
‎2008 May 27 12:27 PM
thanks fr the helpful answer.
please tell me how to prefix 0 to 5-12-2008?
using concatenate??
please help...
‎2008 May 27 12:31 PM
‎2008 May 27 12:14 PM
Hi Poonam,
Check this out
CONVERSION_EXIT_PDATE_INPUT
- Conversion Exit for Domain GBDAT: DD/MM/YYYY -> YYYYMMDD
‎2008 May 27 12:18 PM
‎2008 May 27 12:23 PM
date_old(10) type c value '27-05-2008'.
date new(10) type c.
day = date_old+2(2)
month = date_old+3(2)
year = date_old+6(4)
concatenate year '-' month '-' day into date_new.