mike
mike

Reputation: 31

Compare current date with table data?

How can I compare current date with stored date in SAP HANA?

When I am using dateFrom > CURRENT_DATE in where clause it gives following error:

CURRENT_DATE is reserved SQL keyword and cannot be used

dateFrom is of type UTCTimestamp.

Upvotes: 3

Views: 16511

Answers (1)

Caio Melzer
Caio Melzer

Reputation: 130

First check the type of field, if is char, you need to convert this to DATE content, using TO_DATE(YOUR FIELD, MASK),

Then you can use NOW(), to get the current time and date from server.

Upvotes: 1

Related Questions