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