cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent! Converting the Date format in Smartform

Former Member
0 Kudos

Hi Peers,

In a smart form , I have a field LFDAT(Delivery Date) to be displayed.

VBDPA-LFDAT is a Char(10) field.

The Non- North American customer (eg: Indian customer) use a date format of

18.06.2007 (dd:mm:yyyy) . But American customers use 06/18/2007(mm:dd:yyyy) format.

My requirement is, if the date format is 18.06.2007 , it should be converted to 06/18/20007 .

Can someone give me a procedure to check if the date format is in mm:dd:yyyy format , if not then change it to mm:dd:yy.

It's very urgent. Quick responses will be greatly rewarded.

Thanks,

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check this link for a sample code that will convert from dd.mm.yyyy format to internal format...

https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-FunctionmoduleforconvertinganyExternaldateformattoInternalformat

Then once you get the interal format...

Then use WRITE: V_DATE TO V_CHAR MM/DD/YYYY.

Thanks,

Naren

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Daniel,

Try to use the FM "CONVERT_DATE_TO_EXTERNAL".

Regards,

Bhasha