‎2008 Dec 04 4:45 PM
Hi
I am having Date in a field type DATS,(YYYYMMDD)
and Time in anathor field type TIMS.(HHMMSS)
supoose date is: 20081204 and time : 185549
then I want to get in this format: 041220081855
Please suggest if there is any FM or how can i do this.
Amresh
‎2008 Dec 04 4:55 PM
Hi First pass both the fields to character fields and then concatenate them.
Data:c_date(8),
c_time(6),
c_stamp.
c_date = Date.
C_time = Time.
concatenate c_date c_time into c_stamp.
Try this
good luck Neha.
‎2008 Dec 04 4:48 PM
Try any of these:
DATE_GET_WEEK Returns week for a date
WEEK_GET_FIRST_DAY Returns first day for a week
RP_LAST_DAY_OF_MONTHS Returns last day of month
FIRST_DAY_IN_PERIOD_GET Get first day of a period
LAST_DAY_IN_PERIOD_GET Get last day of a period
RP_LAST_DAY_OF_MONTHS Determine last day of month
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_IN_FUTURE Calculate a date N days in the future.
RP_CALC_DATE_IN_INTERVAL Add days/months to a date
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
DATE_CREATE Calculates a date from the input parameters:
Good luck from Neha
‎2008 Dec 04 4:52 PM
‎2008 Dec 04 4:50 PM
Hi
U need to elaborate the date in order to obtain your format:
DATA: MY_FORMAT(12) TYPE C.
MY_FORMAT(2) = SY-DATUM+6(2).
MY_FORMAT2(2) = SY-DATUM4(2).
MY_FORMAT+4(4) = SY-DATUM(4).
MY_FORMAT+8(4) = SY-UZEIT(4).
Max
‎2008 Dec 04 4:55 PM
Hi First pass both the fields to character fields and then concatenate them.
Data:c_date(8),
c_time(6),
c_stamp.
c_date = Date.
C_time = Time.
concatenate c_date c_time into c_stamp.
Try this
good luck Neha.