In this tutorial I will show you how to convert datetimeoffset to datetime using c#. Here, I want to save the datetime object value into the database. But the datetimeoffset was returning string value. In order to convert string (datetimeoffset) to datetime you may follow this way,
DateTimeOffset newTime = TimeZoneInfo.ConvertTime(DateTimeOffset.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"));
invoice.CreatedOn = newTime.DateTime;