DateTime.FromOADate missing function

So, This is a missing function from the .net micr framework (DateTime.FromOADate)

This method receives one double value as its parameter, and the returns a full DateTime.

I found a workaround that seem to behave correctly

ulong Days_From_Jan01_0001; // = days @ 1/1/0001

Days_From_Jan01_0001 = 28024

Old code:
DateTime d2 = DateTime.FromOADate(Days_From_Jan01_0001); //micro framework does not have FromOADate function

new code
DateTime d2 = new DateTime(1899, 12, 30, 0, 0, 0).AddDays(Days_From_Jan01_0001);

d2 = 09/21/1976

I could not find this info searching the TinyCLR, so I posted it.

There are lots of “missing” function in the Micro Framework. That is why they call it “Micro”.

The MF is targeted for devices with limited memory. The designers tried to reduce the
available functionality to what is essential. Of course, there has always been
discussions as to what is essential.

Generally, FromOADate() isn’t needed on NETMF because there’s no OLE Automation on NETMF.