‎2016 Sep 25 4:21 PM
Dear All,
I am facing an issue when fetching data from Level 2 Oracle server using DBCO connection by writing native SQL. In legacy Oracle server START_DATE column is having data stored in below format:
| 01/13/2011 09:37:56 |
When I am writing select query in ABAP editor in below way I am getting date in this format (25-SEP-16) but time is not coming along with it as it is in same field as above. Can anybody please suggest me syntax to get date and time both
EXEC SQL.
open c for
SELECT * from L2PRD.REPORTS where start_date > TO_DATE('09-25-2016 00:00:00', 'MM:DD:YYYY HH24:MI:SS')
AND AREA_ID = :'400'
ENDEXEC.
Please help.
Regards,
Vipin Saraika
‎2016 Sep 26 9:53 AM
Hi Vipin,
Check the Declaration TYPE of a variable which is getting data in the format '01/13/2011 09:37:56',
Do not refer system fields and predefined data type (sy-datum,dats).
if you given as above change that TYPE to char 20.
ex: lv_date(20) type c.
if it helps u,pls give reward points.
Thanks,
Kiran.