cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format?

Former Member
0 Kudos
76

Hi Experts,

I hv to change the existing date format in Smartforms, so pls. clarify it.

Existing: <b>DD.MM.YYYY</b> need to

Change to: MM/DD/YYYY

So, pls. explain How to do it?

ThanQ.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

You can use function module CONVERSION_EXIT_SDATE_OUTPUT to convert the date format

CONVERSION_EXIT_PDATE_INPUT

And pass the output we get from this function module to the CONVERSION_EXIT_SDATE_OUTPUT.

Here, the first one will convert from the User setting dte format i.e., it can be mm/dd/yyyy or mm.dd.yyyy or dd/mm/yyyy . It will directly convert it to the YYYYMMDD format and the second one will give you, your required output.

~~Guduri

Former Member
0 Kudos

ThanQ to all.

Former Member
0 Kudos

Hi,

If the input is always in the format DD.MM.YYYY..Then check this..

Use the sub field operation to get the values and then use concanate..

Ex.

DATA: V_INPUT(10) VALUE '27.03.2007'.

DATA: V_OUTPUT(10).

CONCATENATE V_INPUT3(2) '/' V_INPUT(2) '/' V_INPUT6(4)

INTO V_OUTPUT.

WRITE: / V_OUTPUT.

Thanks,

Naren

Former Member
0 Kudos

ther are many options. but uthis case if u change the user master record.or select the date format in table usr01.

the hard coating is not at all god and it also have limitation .

this function module also helps u.

CONVERT_DATE_TO_EXTERNAL Converts date from system storage format to users specified display format

let me know if u are not able to get it.

reward all help full answers

/: SET DATE MASK = 'date_mask'

In the date mask, you can use the following codes:

DD: day (two digits)

DDD: day name - abbreviated

DDDD: day name - written out in full

MM: month (two digits)

MMM: month name - abbreviated

MMMM: month name - written out in full

YY: year (two digits)

YYYY: year (four digits)

LD: day (formatted as for the L option)

LM: month (formatted as for the L option)

LY: year (formatted as for the L option)

Assuming the current system date is March 1st, 1997.

/: SET DATE MASK = 'Foster City, MM/DD/YY'

&DATE& -> Foster City, 03/01/97

/: SET DATE MASK = 'MMMM DD, YYYY'

&DATE& -> March 01, 1997

The date mask may be reset to the default setting by using an empty string:

/: SET DATE MASK = ' '

In most print programs there is a function module called as below.

By setting the export parameter PI_COUNTRY one can set the form to print all dates according to country without any further coding.

CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'

EXPORTING

PI_NAST = NAST

PI_COUNTRY = IS_DLV-LAND

PI_ADDR_KEY = IS_ADDR_KEY

PI_REPID = LF_REPID

PI_SCREEN = XSCREEN

IMPORTING

PE_RETURNCODE = CF_RETCODE

PE_ITCPO = LS_ITCPO

PE_DEVICE = LF_DEVICE

PE_RECIPIENT = CS_RECIPIENT

PE_SENDER = CS_SENDER.

If your problem is solved please set the question as answered.

Message was edited by:

sunil kumar