Skip to Content

current_utcdate in SQL query

Dec 13, 2017 at 02:01 PM


avatar image

I am using below query in SQL Console of SAP HANA Studio.

SELECT carrid,connid,fldate,current_utcdate as "Current Date" FROM sflight

I am facing below error

"FROM" is invalid here ( due to grammar). contains an invalid character or it is a

10 |10000 characters needed characters left characters exceeded

Why did you tag that as ABAP Development?


I used the similiar Query in ABAP program but later i was trying to test in SQL Console.I try to change the ABAP Development Tag .


Removed original primary tag "ABAP Testing and Analysis", because that does not really fit to the question.

@Umar: Please add a screenshot to show the error message including the SQL statement. Please also describe what you did, e.g. did you set the correct scheme ...



I was trying to use current_utcdate in sql query but did not find solution.Screen shots are attached.

scc1.png (218.6 kB)
scc2.png (263.4 kB)
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Dec 28, 2017 at 11:58 AM

You are using the SQL Console of the ABAP Development Tools and not of the SAP HANA Tools. Therefore the SAP HANA SQL function CURRENT_UTCDATE cannot be used here, because only Open SQL is valid in that console.

Depending on what you wanna do - use HANA functions or Open SQL functions - you have to either

- switch to the HANA SQL console to apply HANA SQL statements

- use the OpenSQL Date/Time function TSTMP_CURRENT_UTCTIMESTAMP which is available since NW 7.50 (->


10 |10000 characters needed characters left characters exceeded