Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Formula Pushed down to SQL 1

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
0
0
GB
CR10

Progress 9.1D

Hello All,

I've got reports that report 12months back that have to report from the start of each month so that comparisons are constant i'm using the following to do this

dateadd("yyyy",-1,(dateadd("m",+1,minimum(MonthToDate))))

But it is not pushed down as SQL which is ok for the smaller reports, but for the bigger reports they take a lot longer.

Any ideas?

Thanks in advance
 
Hi there,

Try putting this formula into the select expert.

{Your date field} in dateserial((year(currentdate)-1),month(currentdate),1) to dateserial(year(currentdate),month(currentdate)+2,1-1)

This code will be put into the SQL statement so the server will do the processing.

Let me know how this goes.

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top