2007 Mar 02 3:45 PM
i am printing date from sy-datum and time from sy-uzeit 20070301 at 141726 . Can i change this to print like 03.01.2007 and 14:17:26 . I appreciate your responses.
2007 Mar 02 3:50 PM
concatenate v_date4(2) '.' v_date6(2) '.' v_date0(4) '.' v_time0(2) ":" v_time2(2) ':' v_time4(2) ':' into v_date1.
Regards,
Santosh
i am printing date from sy-datum and time from sy-uzeit 20070301 at 141726 . Can i change this to print like 03.01.2007 and 14:17:26 . I appreciate your responses.
2007 Mar 02 3:47 PM
2007 Mar 02 3:48 PM
Hello,
DATA: LV_DATUM(10),
LV_TIME(8).
write: sy-datum to LV_DATUM,
sy-uzeit to lv_time.
write: LV_DATUM,LV_TIMEIf useful reward.
Vasanth
2007 Mar 02 3:48 PM
You may use these formatting options with WRITE statement:
... DD/MM/YY
... MM/DD/YY
... DD/MM/YYYY
... MM/DD/YYYY
... DDMMYY
... MMDDYY
... YYMMDD
For TIME:
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33
Thanks,
Santosh
Message was edited by:
SKJ
Message was edited by:
SKJ
2007 Mar 02 3:48 PM
2007 Mar 02 3:48 PM
Hi,
You can change this to User format, use this code.
data: date type sy-datum,
time type sy-uzeit.
Data: Date1(10) type c.
data: time1(8) type c
Date = sy-datum.
time - sy-uzeit.
Write: Date to Date1,
time to TIME1.
Write:/ Date1, Time1.Regards
Sudheer
2007 Mar 02 3:49 PM
Hi,
Use this CONVERT_DATE_TO_INTERN_FORMAT
or
CONVERT_DATE_TO_EXTERNAL
CONVERT_DATE_TO_INTERNAL
CONVERT_DATE_INPUT
CONVERT_DATE_WITH_THRESHOLD
CONVERT_DATE_BY_PERIOD_INPUT
CONVERT_DATE_BY_PERIOD_OUTPUT
Use any one of this .
Regards,
Sreevani
2007 Mar 02 3:50 PM
concatenate v_date4(2) '.' v_date6(2) '.' v_date0(4) '.' v_time0(2) ":" v_time2(2) ':' v_time4(2) ':' into v_date1.
Regards,
Santosh
2007 Mar 02 3:51 PM
Concatenate sy-datum4(2) '.' sy-datum6(2) '.' sy-datum+0(4) into v_date.
Do same for time.
Regards,
Amit
2007 Mar 02 3:51 PM
2007 Mar 02 3:53 PM
2007 Mar 02 4:46 PM
concatenate sy-uname 'Logged on to' sy-sysid
'on' date 'at' sy-uzeit
into email_data-obj_descr separated by space.
how do i change this statement now .
2007 Mar 02 4:47 PM
2007 Mar 02 4:53 PM
Copy your sy-datum to a variable of length 10 and same for time aswell and then write that variable. The write statement will print it as per your settings made like '.' or '/' or what ever it is set to.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |