I am writing a API client Wrapper for C# where I have to implement an interface which accepts the date as an DateTime object in 'yyyy-mm-dd' format.
What I have tried:
I have looked for lot of solutions but couldn't find one. It can be achieved by converting the DateTime to string but I need it as DateTime object only.
With Parse and ParseExact it gives output which include time 00:00:00 also, but the requirement is only to ger 'yyyy-mm-dd' format as DateTime object. Can someone please help??
Thanks in Advance



Amit GuptaRank #190 · 12.8K reputationPosted Dec 27, 2018, 7:17 PM EST
Rahul Kashyap22 reputationPosted Dec 27, 2018, 1:31 AM EST
Amit Joshi24 reputationPosted Dec 26, 2018, 8:21 PM EST
Suraj KumarRank #353 · 7.1K reputationPosted Dec 26, 2018, 8:30 PM EST
Amit Joshi24 reputationPosted Dec 26, 2018, 8:33 PM EST
Suraj KumarRank #353 · 7.1K reputationPosted Dec 26, 2018, 8:37 PM EST
Amit Joshi24 reputationPosted Dec 26, 2018, 8:38 PM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Dec 26, 2018, 11:41 PM EST
Suraj KumarRank #353 · 7.1K reputationPosted Dec 27, 2018, 7:23 PM EST