And as always better to do this at front end unless you dont have a way out. Try to keep date values as date type itself in SQL. otherwise it will cause issues if require any further manipulation with them.