I have a situation in which user apply filter on reporedOn column data is filtered according to provided dates. But date is in below format which cause an exception.
Mon Jul 02 2018 00:00:00 GMT+0530 (India Standard Time)
I only want date and time. for ex. 8/29/2018 19:43:0
How can I convert above date format to the date time in C#. I am looking for general solution which works for any timezone. I don't want to add any patch in the code by checking length of the string and use substring function and extract the required string and all.
Timezone may change from India Standard Time to Pacific Time
or any other time zone.