2007 Aug 07 6:43 AM
Hi All,
String is in following format: 2006-12-07 i.e yyyy-mm-dd
I want it in 07.12.2006 date format.
which function module should i used to convert it?
Regards,
Nilima
Hi All,
String is in following format: 2006-12-07 i.e yyyy-mm-dd
I want it in 07.12.2006 date format.
which function module should i used to convert it?
Regards,
Nilima
2007 Aug 07 6:45 AM
Use the FM : CONVERSION_EXIT_IDATE_INPUT to convert date to Date format.
Regards
Gopi
2007 Aug 07 6:53 AM
Hi Nilima,
lv_date = 2006-12-07
use
concatenate lv_date+8(2)
'.'
lv_date+5(2)
'.'
lv_date+0(4)
into lv_date_new
Regards
Arun
2007 Aug 07 7:15 AM
Hi,
Try like this:
DATA: ZTEMP(10),zdd(3),zmmm(3),zyyyy(4),zfinal(12), v_date(10) type c.
CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.
v_date = '2007-08-07'. "yyyy-mm-dd
zyyyy = v_date+0(4).
zmmm = v_date+5(2).
zdd = v_date+8(2).
concatenate zdd '.' zmmm '.' zyyyy into ztemp.
write:/ v_date,
/ ztemp.
Regards,
Bhaskar
2014 Jan 30 8:41 AM
an other way to do this :
| Code |
|---|
DATA : ld_text(20) TYPE c, ld_date TYPE datum. ld_text = '2006-12-07'. REPLACE ALL OCCURENCES OF '-' IN ld_text WITH ''. WRITE ld_text TO ld_date. WRITE ld_date. |
2014 Jan 30 8:54 AM
Hi,
I dont think there will be FM for this. Try Like this
data: lv_formatdate(10) type c,
lv_date type char10.
lv_date = 2006-12-07.
var1 = lv_date+(4).
var2 = lv_date+5(2).
var3 = lv_date+8(2).
concatenate var3 var2 var1 into lv_formatdate separated by '.'.
Regards,
Prashant
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |