• Thank you Steven. This will be really helpful for me, i want to convert this to SQL FUNCTION and there is restriction we cant SET DATEFORMAT in the function. I have the view and wanted to use against a column in the view.

    Thanks