Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DateDiff Crystal SQL Command

Hi, is it possible to use DateDiff in a Crystal SQL Command?

I have tried this:

(last_date_of_service is a field in my database)

Select ...., DateDiff("d", last_date_of_service, Date) As "DAYS"

From mytable as "mt"

I get this error <A term expected, beginning with either of: udentifier, constant, aggregate, $$, (, :, +..... or %Upper^Sele [Database Vendor Code:12]

Former Member
replied

Hi Nate,

The syntax you use in a SQL Command depends on your database.  For example SQL Server would use GetDate(). 

Thanks,

Brian

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question