Skip to Content
0
Former Member
Jul 27, 2005 at 01:38 PM

Query about date comparison

36 Views

Hi,

I have a database table with a date field called 'ENDDAT'

How do I write a select query that selects all records whose difference between sy-datum and 'ENDDAT' is greater than 7.

If I do the normal date comparison for eg.

select * from <databasetable> where enddat - sy-datum > 7

or

select * from <databasetable> where (enddat - sy-datum) > 7

It throws error that '-' is not a valid comparison operator.

Can anyone help????