Converting a DateTime() to a Double?!

C

chris-s

I'm converting some old eVB code, argh!, and have a requirement to
convert a datetime value into a double in order for them to retain
some database compatibility.

The old eVB code simply did "CDbl(Now())", any suggestions on how to
obtain the same result in .Net?

Cheers

Chris
 
P

Paul G. Tobey [eMVP]

What are the semantics of the result? Number of seconds since XYZ?
Something else? DateTime has a bunch of different ToXYZ() methods. Take a
look at ToOADate(). Something like DateTime.Now.ToOADate().

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top