‎2010 Feb 22 6:15 AM
Hi all,
convert date date1 time time1 into time stamp tstamp1 time zone sy-zonlo.
date1 - "99991231"
time1 - "235959"
Sy-zonlo - EST
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps.
The above statement with the values mentioned in here results into a value "0".
Could any one help with this??
Regards,
Kiruthika
Edited by: Kiruthika Raghunathan on Feb 22, 2010 1:15 AM
‎2010 Feb 22 6:25 AM
Hello,
date1 - "99991231"
time1 - "235959"
Sy-zonlo - EST
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps.
" IF this doesnt allow concateation then take String type variable and then Concatenate
Concatenate date1 time1 into tstamp1 " this will give you time stamp valueCheerz
Ram
‎2010 Feb 22 6:25 AM
Hello,
date1 - "99991231"
time1 - "235959"
Sy-zonlo - EST
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps.
" IF this doesnt allow concateation then take String type variable and then Concatenate
Concatenate date1 time1 into tstamp1 " this will give you time stamp valueCheerz
Ram
‎2010 Feb 22 6:33 AM
Hello Ram,
I want to do some conversion based on the Timezone and i will have different values of date and time. Only for this convertion the result is Zero.
Regards,
Kiruthika
‎2010 Feb 22 6:42 AM
Hi,
Use the below FM.
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps.
DATe1 = '99991231'. (pass in quotes)
time1 = '235959'. (pass in quotes)
CALL FUNCTION 'CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = date1
i_timlo = time1
i_tzone = 'EST'
IMPORTING
e_timestamp = tstamp1.It works as per your requirement.
Regards,
Ganga
‎2010 Feb 23 4:15 AM
Hi Ganga,
Thanks a lot and this solved my problem.
Regards,
Kiruthika
‎2010 May 12 9:30 AM
Hey,
I ma facinf the problem with same in timezone.
Can you clear me :
we are saving the data ,time,timezone in a data base table.If I want to see the record for that particuler when the USA daylight saving want to display the daylight saving USA timezone right?
FOr that can you let me know any methods or Function modules are there to convert using the date,time,timezone to daylight saving time zone.
I have to use this beofre displaying the screen.
Please let me know.
Thanks
Rmakumar
‎2010 Feb 22 6:44 AM
That is because your Timezone is incorrect in the convert statement. Timezone should be a part of TTZZ table and field as TZONE.
You can check the TTZZ table and change your code as shown below.
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps.
data: tz type ttzz-tzone.
date1 = '20101231'.
time1 = '210000'.
tz = 'IRAQ'.
convert date date1 time time1 into time stamp tstamp1 time zone tz.
write: tstamp1.
‎2010 Feb 22 6:45 AM
Hi,
Test the following code.It is not giving zeros.You need not pass time zone is EST.You just remove that assignment you can get the coreect result.
data: date1 type datum.
data: time1 type uzeit.
data: tstamp1 type tzntstmps,tz type ttzz-tzone.
date1 = '99991231'.
time1 = '235959'.
convert date date1 time time1 into time stamp tstamp1 time zone tz.
write:tstamp1.
Thanks.
Ramya.
‎2010 Feb 22 6:46 AM
For EST time zone,System by default takes EST only.But,For other time zones you have to pass the timezone.
‎2010 Feb 22 7:28 AM
Hi,
Try with this FM HRIQ_PROC_DH_DATETIME_TIMESTMP.
Thanks,
Suman