There has been always a Problem in working DateTime variable in ASP.NET when you are working on different environments. So I feel that why not make some short of solution for that. Here i came up with some result. May be there is better alternative. Create one common class or if you have in your project than all you need to create is static method to convert string into DateTime with ‘MM/dd/yyyy’ Format.