‎2006 Mar 02 8:58 AM
Hi!
How can convert variable(date) from format yyy.mm.dd to dd.mm.yyyy?
Thanks forehead!
‎2006 Mar 02 9:02 AM
hi
Use write statement.
use f1 or goto pattarn -> WRITE -> FIELD(specify name)->
Multiple selection(yellow arrow button button)-> for date fields (Chck box and radio button)
WRITE - Formatting options
... DD/MM/YY
... MM/DD/YY
... DD/MM/YYYY
... MM/DD/YYYY
... DDMMYY
... MMDDYY
... YYMMDD
U can use into another variable.
and then use that particular variable.
regards
vinod
Message was edited by: Vinod Gunaware
‎2006 Mar 02 9:02 AM
Hi,
if you want to display into your screen, just write the variable type d.
write w_date (that will show you as your country standard)
if you want to set into a char type
concatenate date6(2) date4(2) date+0(4) into w_char separated by '.'.
Remember that SAP store date into a type and display sometime into another one. SAP used field-exit to perform this.
Rgd
Frédéric
‎2006 Mar 02 9:02 AM
hi
Use write statement.
use f1 or goto pattarn -> WRITE -> FIELD(specify name)->
Multiple selection(yellow arrow button button)-> for date fields (Chck box and radio button)
WRITE - Formatting options
... DD/MM/YY
... MM/DD/YY
... DD/MM/YYYY
... MM/DD/YYYY
... DDMMYY
... MMDDYY
... YYMMDD
U can use into another variable.
and then use that particular variable.
regards
vinod
Message was edited by: Vinod Gunaware
‎2006 Mar 02 9:03 AM
Hi Welcome !!
System menu>user profile>own data >defaults>date format set to dd.mm.yyyy
===============================
FModules
CONVERT_DATE_TO_INTERNAL
CONVERT_DATE_TO_EXTERNAL
===============================
Dynamically u can do by writing a program
Use any of the foll. FM
HRGPBS_HESA_DATE_FORMAT
Format a date valid for HESA: DD/MM/YYYY
HRGPBS_TPS_DATE_FORMAT
Format a date valid for TPS: DDMMYY
SLS_MISC_GET_USER_DATE_FORMAT
get the date format the user has defined as his/her default
========================================
REPORT ZES .
data: v_date type char10.
CALL FUNCTION 'HRGPBS_HESA_DATE_FORMAT'
EXPORTING
p_date = sy-datum
IMPORTING
DATESTRING = v_date.
replace all occurences of '/' in v_date with '.' .
write v_date.
hope it solves your problem. pls close the thread by allocating points if u satisfy with solutions.
Message was edited by: Eswar Kanakanti
‎2006 Mar 02 9:03 AM
Hi,
Try the FM: Try FM 'CONVERT_DATE_TO_EXTERNAL'
http://help.sap.com/saphelp_nw04/helpdata/en/07/d63a68db9110459d63c495b16f522e/content.htm
DATA: lv_date(10) type c,
fi_date(10) type c.
lv_date = '2006.03.02'.
CONCATENATE lv_date+8(2) '.' lv_date+5(2) '.' lv_date+0(4) into fi_date.
write: fi_date.OP: 02.03.2006
Best Regards,
Anjali
‎2006 Mar 02 9:05 AM
Hi los,
1. simple.
2. REPORT abc.
DATA : d1(10) TYPE c.
DATA : d2(10) TYPE c.
d1 = '2006.02.25'.
CONCATENATE d18(2) '.' d15(2) '.' d1(4) INTO d2.
WRITE d2.
regards,
amit m.
‎2006 Mar 02 9:07 AM
1.U CAN USE 'USING EDIT MASK' statement with write
write d using edit mask dd.mm.yyyy
2. or u can declare a char variable of 10
use concatenate statement
data: date(10).
concatenate d(2) '.' d2(2) '.' d4(4) into date
Message was edited by: Hymavathi Oruganti
‎2006 Mar 02 9:12 AM
‎2006 Mar 02 9:38 AM
OK, now I have another problem.
I used "write" and it changed format to dd.mm.yyyy, but it inserts delimeter(.), so how can i delete the (.)?
‎2006 Mar 02 9:52 AM
Hi again,
1. simple.
2.
data: m(10) type c.
m = '22.05.2006'.
<b>replace all occurrences of '.' in m with ''.</b>
write m.
regards,
amit m.
‎2006 Mar 02 10:08 AM
THEN WHILE WRITING WRITE STATEMEENT ITSELF, INSTEAD OF '.'
GIVE A SPACE
WRITE DATE USING EDIT MASK 'DD MM YYYY'
‎2006 Mar 02 10:09 AM
‎2006 Mar 02 10:16 AM
Hi,
1. As per the forum etiquette,
u may pls award points
to helpful answers by clicking the STAR
on the left of that reply.
regards,
amit m.
‎2006 Mar 07 6:09 AM
Hi
It show me completely solve query however the point for it is not yet updated.
Is pt assignment development not working properly?
Regards
Vinod