Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic date formatting

Former Member
0 Kudos

I want to be able to format a date from a source field of type D into a target of type C (this will go in a file to the bank) such that the format is defined dynamically at run time; so if the user specifies DD/MM/YYYY today would look like 23/10/2007 or if they specified YY-MM-DD they'd get 07-10-23

I've searched for function modules containd DATE or DATUM in the name and I don't find any in our 46C system. I'm kind of surprised there isn't something.

Note: I am not talking about the limited number of hard coded formats available as add-ons to the WRITE command.

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

Check DATE_STRING

Former Member
0 Kudos

Hi NXO

Please check FM

SLS_MISC_CONVERT_TO_DATE

P_DATE_FORMAT can be of the folowing formats:

(check domain XUDATFM) or

DD.MM.YYYY

MM/DD/YYYY

MM-DD-YYYY

YYYY.MM.DD

YYYY/MM/DD

YYYY-MM-DD

GYY.MM.DD (Japanese Date)

GYY/MM/DD (Japanese Date)

GYY-MM-DD (Japanese Date)

YYYY/MM/DD (Islamic Date 1)

YYYY/MM/DD (Islamic Date 2)

YYYY/MM/DD (Iranian Date)

Regards,

Arun

Former Member
0 Kudos

Thanks for the suggestions, but neither of those exist in our system.