on 10-22-2007 6:39 AM
Hi Experts,
I need to convert 10/10/2007 to 10-october-2007 in my smart forms please advice
hi,
take the month value as month = date+3(2)
Call FM IDWT_READ_MONTH_TEXT.
Pass two parameters.one language and other month value . Here it is month.
take t247-lxt as month text. concatenate day and year with t247-lxt separated by '-'. Pass this value to smartforms.
Thanks,
Sanjukta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use MONTH_NAMES_GET to get name in var suppose mon_name.
Concatenate sy-datum4(2) '-' mon_name '-' sy-datum0(4).
Regards,
Reward all helpful queries
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use Function Module MONTH_NAMES_GET to get the month in char format
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi karthick,
Formatting of the date field can be defined with SAPscripts SET DATE MASK command.
Synatx :
<b>/: SET DATE MASK = 'date_mask'.</b>
DD : day
DDD : name of the day(wed)
DDDD : name of the day written in full (wednesday)
MM : month
MMM : name of the month(JUN)
MMMM : Name of the month (JUNE)
YY : year
YYYY : year
So, for ur requirement......
<b>/: SET DATE MASK = 'DD-MMMM-YYYY'.</b>
<b>&DATE&</b> -
> 10-october-2007. " date will be according to sy-datum
Reward me if useful,
Harimanjesh AN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use this
1. 01-08-2007 -
> 01.AUG.2007
2. use the FM - CONVERSION_EXIT_SDATE_OUTPUT
or
take help from this code :
data : date(10),
text1(26),
num1(10),
test_day(15),
o_date(20),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '01-08-2007'.
day = date+0(2).
month = date+3(2).
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
idate = idate
IMPORTING
DAY = oday
MONTH = omonth
YEAR = oyear
LTEXT = ltext.
concatenate oday '-' ltext '-' oyear into o_date.
write : O_date.
Reward points, if helpful,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.