09-22-2008 7:50 AM
Dear all,
i have a date field which is YYYY/MM/DD format. how to convert this into DD/MM/YYYY format.
Regards
Venkat
09-22-2008 7:58 AM
09-22-2008 7:58 AM
09-22-2008 7:58 AM
Hi,
Use Function module 'CONVERT_DATE_TO_EXTERNAL'.
Make sure to pass the export and import parameters accordingly.
Use sy-datum for Exporting ---> date_internal.
Use ur date variable for Importing ---> date_external
Hope this helps.
Regards,
Darpana.
09-22-2008 8:01 AM
hi
You can also try using convert_calendar_date FM.
Regards,
Vishwa.
09-22-2008 8:03 AM
YYYY/MM/DD format. how to convert this into DD/MM/YYYY
Hi
for this take another variable of type DATE
w_date - YYYY/MM/DD
w_new_date - DD/MM/YYYY
w_new_date0(2) = w_date8(2).
w_new_date3(2) = w_date5(2).
w_new_date6(4) = w_date0(4).
like this you can get that format.
09-22-2008 9:30 AM
Hi,
you can try out this fution module also...Let c_form be the required format for date...
data : g_in_f type nlei-ibgdt,
g_out_f type m1datum-datex,
c_form type m1datum-format value 'DD/MM/YYYY'.
G_IN_F = DATE in old format.
call function 'FORMAT_DATE_4_OUTPUT
exporting
datin = g_in_f
format = c_form
importing
datex = g_out_f.
hence the date in new format is obtained in G_OUT_F.
Thanks & regards,
Ginni
09-22-2008 9:42 AM
09-22-2008 10:19 AM
Hi,
Concatenate cu_date8(2) cu_date4(4) cu_date+0(4) into ch_date.
Regards,
Surinder
09-22-2008 11:03 AM
go to system in the menu bar and go to user profile and then go to own data.a window is displayed and change date format according to u..then restart ur system..it wil work as per ur date format.
regards
deepika
Edited by: deepika reddy on Sep 22, 2008 12:04 PM
09-22-2008 2:10 PM
Hi Venkata,
The FM CONVERT_DATE_FORMAT Converts date from yyyymmdd to ddmmyyyy format
Regards,
Salini.
09-23-2008 10:36 AM
Use this function module
call function 'FORMAT_DATE_4_OUTPUT
exporting
datin = " give the date to be converted
format = "give the format such as DD/MM/YYYY
importing
datex = "get the output field in a character field
09-23-2008 11:18 AM
Hi!
FM CONVERSION_EXIT_PDATE_OUTPUT
for example:
Import parameters Value
INPUT 20080923
Export parameters Value
OUTPUT 23.09.2008
hope this helps u!
Deepika
09-23-2008 2:26 PM
Hi,
Try this function module DATE_STRING_CONVERT.
Pass parameters DATE_FORMAT = 4, DATE_STRING = '2008.09.23'
Then the RESULT_DATE would be 23.09.2008.
If you want to provide DATE_STRING as '2008/09/23' then DATE_FORMAT should be 5
If you want to provide DATE_STRING as '2008-09-23' then DATE_FORMAT should be 6
Regards,
Venkat