FireGeek21
Technical User
I am using a SQL Expression to pull in some data. I need a value if it occurs in the last 6 months from today. This file will run weekly so the last 6 months is a moving date range.
In the WHERE clause, I have been able to use a date range when the start/stop is known such as the following for 1/1/2014 - 12/31/2014:
WHERE DATE >= {fn CONCAT({fn CONVERT({fn YEAR({fn CURDATE()})},SQL_VARCHAR)}, '-01-01')}
and DATE <= {fn CONCAT({fn CONVERT({fn YEAR({fn CURDATE()})},SQL_VARCHAR)}, '-12-31')}
Here is where I am trying to capture the start/stop date - the start point is the problem:
WHERE DATE >= [TODAY - 6 months or TODAY - 180 days]
and DATE <= {fn CURDATE()})
Thank you for any help you can offer!!!
FireGeek
(currently using Crystal Reports XI with Lawson 9.01)
In the WHERE clause, I have been able to use a date range when the start/stop is known such as the following for 1/1/2014 - 12/31/2014:
WHERE DATE >= {fn CONCAT({fn CONVERT({fn YEAR({fn CURDATE()})},SQL_VARCHAR)}, '-01-01')}
and DATE <= {fn CONCAT({fn CONVERT({fn YEAR({fn CURDATE()})},SQL_VARCHAR)}, '-12-31')}
Here is where I am trying to capture the start/stop date - the start point is the problem:
WHERE DATE >= [TODAY - 6 months or TODAY - 180 days]
and DATE <= {fn CURDATE()})
Thank you for any help you can offer!!!
FireGeek
(currently using Crystal Reports XI with Lawson 9.01)