This weekend i tried to incorporate this functionality into one of my apps, but it break on the conversion from nvarchar to date in case the system date format is setto dd-mm-yyyy.
Can somebody tell me how to adjust the logic to prevent this?