DateTime To Float

I have a Delphi DateTime in the registry represented as a float (i.e 90074.3829327199).  The problem is that I need to take a DateTime in C# and represent it in the same fashion.  Does anyone know how to do this?
Who is Participating?
I'm not 100% sure about it, but it sounds like it's an OLE Automation date. If that's the case the methods ToOADate and FromOADate of the DateTime class might be of use.
See and for details.

Hope that helps.
I once solved a similar problem by removing the decimal character so it ends up as an "Int64" (aka "long") type.
That way, you can use it as "ticks" when creating the DateTime.

Int64 ticks = createTicksFromValue(90074.3829327199);  // making it into 900743829327199
DateTime mydate = new DateTime(ticks);

But I'm not sure if this is the right approach for this, but I think it's worth mentioning :-)
Todd710Author Commented:
You save my bacon thanks for the quick answer!  I was that indeed.
You're welcome.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.