convert a C# datetime object into Excel date format
<p>I need to convert a C# datetime object into the dreaded Excel date format:
<a href="https://datapub.cdlib.org/2014/04/10/abandon-all-hope-ye-who-enter-dates-in-excel/" rel="nofollow">https://datapub.cdlib.org/2014/04/10/abandon-all-hope-ye-who-enter-dates-in-excel/</a></p>

<p>i.e. number of days since 1 Jan 1900 expressed as a floating point number.</p>

<p>Is there any way to do it without resorting to DIY code?
I need it in order to create Excel-friendly CSV exports</p>

<p>Googling around I didn't find anything useful except that good blog post</p>