Having just been testing this for a client, adding new date filters for a provider is quite easy, except that the values are coded in SQL, which gets added into some other SQL before being executed.
The 'default' "Two year" filter looks like this:
- Code: Select all
SELECT DATEADD(year,-2,GETDATE())
Which gives you two years prior to the date of execution. But what if you want to archive whole financial years, and you're already months into the year?
Well, since Jiwa kindly has a table of financial years - the GL_Config table, it should be easy enough to use that.
- Code: Select all
SELECT MAX([YearStartingDate])
FROM [dbo].[GL_Config]
WHERE DATEDIFF(year, [YearStartingDate], GETDATE()) > 5