‎2007 Apr 02 10:21 AM
hi all,
well I m facing problem with date format.
I have fetched value from VBAK-VDATU.. and saved it in a variable V_VDATa type dats however when i print that it prints as anormasl text. i like to print in
'DD.MM.YYYY' format.
is there any funtion module that can resolve my problem ?
‎2007 Apr 02 10:26 AM
Hi ,
you can get that value using offset.
concatanate v_vdat6(2) v_vdat4(2) v_vdat+0(4) into VDATE seperated by '.' .
‎2007 Apr 02 10:24 AM
Hi,
Move vbak-vdatu to a 10 char field and it will write in the format DD.MM.YYYY.
regards,
Anji
‎2007 Apr 02 10:26 AM
‎2007 Apr 02 10:26 AM
Hi ,
you can get that value using offset.
concatanate v_vdat6(2) v_vdat4(2) v_vdat+0(4) into VDATE seperated by '.' .
‎2007 Apr 02 10:33 AM
REPORT YCHATEST.
DATA : V_DATE TYPE DATS VALUE '20070402',
V_DATE1(10).
CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
INPUT = V_DATE
IMPORTING
OUTPUT = V_DATE1.
WRITE : V_DATE.
‎2007 Apr 02 10:37 AM
Hi..,
its simple...
define the variable V_VDAT as
data v_vdat type sy-datum.
thats it.
regards,
sai ramesh
‎2007 Apr 02 10:56 AM
hi arnab,
date format is depent on the user setting done while creating the user. it you want date should be written in ur formate not in the user then write following code.
WRITE sy-datum DD.MM.YYYY.
here data is printed in DD.MM.YYYY format.
Reward if useful.
Regards,
Kapil Soni
‎2007 Apr 02 11:09 AM
Hi Arnab,
Well your prooblem can be solved using 2 different things.....
1. V_VDATA TYPE VBAK-VDATU.
what i think is that changing the type from date to the table from where you are fetching the value, will be definately helpful.
2. You can change the user data which also has the format in which the date is to be displayed.
or you can use the 3rd option
3. CONVERT DATE f1 INTO INVERTED-DATE f2
where f2 is of type c.
F2(10) TYPE C.
Reward if helpful.......
Thanks and Regards,
Kunjal Patel