02-24-2006 11:22 AM
How do we handle system date format is mm/dd/yyyy but the enduser format is dd.mm.yyyy.
02-24-2006 11:25 AM
use write statement
write ur_datum to req_date.
red date should be of type c char 10.
02-24-2006 11:25 AM
use write statement
write ur_datum to req_date.
red date should be of type c char 10.
02-24-2006 11:37 AM
Hi Sonia,
Do you want the date to be printed in dd.mm.yyyy format in the report...
regards
satesh
02-24-2006 11:40 AM
go sytem->userprofile->owndata
go to defaults there and change the format to what ever required
02-24-2006 11:41 AM
02-24-2006 11:44 AM
Hi,
Use the WRITE stmt. It will convert it to the user format and print!
make sure u consider all possible system formats when handling date field. Ideally u shd use a FM to convert!
-Aarthi.
02-24-2006 11:52 AM
a few clarifications!
-When U/I said 'system format', I assume it is ur system format and not the internal date format! as sum1 jus said internal date format is always yyyymmdd!!
-When I said account for all poss formats -> make sure ur code handles dot separated, '/' separated format and also the various sequence like mm/dd/yyyy, dd/mm/yyyy etc.
02-24-2006 11:43 AM
Hi,
Use any of the foll. FM
HRGPBS_HESA_DATE_FORMAT
Format a date valid for HESA: DD/MM/YYYY
HRGPBS_TPS_DATE_FORMAT
Format a date valid for TPS: DDMMYY
SLS_MISC_GET_USER_DATE_FORMAT
get the date format the user has defined as his/her default
Hope it solves..
Thanks
Eswar
========================================
Hey..Here is the complete code
REPORT ZES .
data: v_date type char10.
CALL FUNCTION 'HRGPBS_HESA_DATE_FORMAT'
EXPORTING
p_date = sy-datum
IMPORTING
DATESTRING = v_date.
replace all occurences of '/' in v_date with '.' .
write v_date.
Message was edited by: Eswar Kanakanti
02-24-2006 11:46 AM
Hi sonia,
1. system date format is mm/dd/yyyy
The systems date format is always YYYYMMDD.
2. but the enduser format is dd.mm.yyyy.
Well, that can be changed from user profile :
SYSTEM --- > USER PROFILE ---> OWN DATA
3. In that there is DEFAULTS tab.
In that, select the format.
regards,
amit m.
02-24-2006 11:57 AM
Hi Sonia,
As amit said ask your user to change his profile, ask him to run SU3 and maintain his own format of date.
its a small thing. which ever format he likes ask him to choose from the available formats...
Regards
vijay
02-24-2006 12:15 PM
Hi,
data : d1(10) value '12/31/2006',
d2(10).
concatenate d13(2) '.' d10(2) '.' d1+6(4).
Kindly reward points if it helps.
02-24-2006 12:17 PM
if its in an internal table output
u can use write:/ date1 to date2 using edit mask
'__'/'__'/'____' this can be filled as mm/dd/yyyy or dd/mm/yyyy .
if ur looking for the system settings then got tansaction SU01 and giv the user and in the change mode
go to defaults subscreen and adjust the date format to ur desired format.
regards,
vijay.