SSP-1224 - add cast to date for sql server