When accessing HumanTasks older than 24 days stored in an Microsoft SQL Server you end up getting such an exception:
The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart.. Stacktrace follows:
com.microsoft.sqlserver.jdbc.SQLServerException: The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart.
Microsoft's DATEDIFF function returns an INT, which explains the ~ 24 days limit, cf.:
http://msdn.microsoft.com/de-de/library/ms189794.aspx
Could this be fixed by overriding/adding values to databaseSpecificDateDiff[123] in:
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/DbSqlSessionFactory.java