I want to transfer a variable containing DateTime string to the XML file. Is there any way to access data from C# Class in XML File.
Here's my C# Code:
DateTime dt = DateTime.Today.AddHours(17);
string datetime = dt.ToString("yyyy-MM-ddTHH:mm:ss");
Here's my XML Code where I need to access this data string:
<ProductLastModifiedDate>2020-02-21T09:00:00+05:30</ProductLastModifiedDate>
In the above XML Code I want to set dateTime retrieved from C# class file.