Converting DateTime format when retrieving a dataset

J

John Dann

I have an Access-type database (actually created by ado.net via Jet
4.0 etc) with one column storing date/time information as DateTime
type. I need to retrieve this particular date/time column (along with
others) into a dataset or datareader but in the older OA format (ie
as a double type) for compatibility with a legacy control.

The question is whether it's possible to do this conversion eg within
the query used to populate the ds/dr and if so what would the correct
form of the query be please? I know that there's a ToOADate function
in VB.Net which will do the DateTime to Double type conversion, but
it's maybe unlikely (?) that I can use this within the query?

TIA
John Dann
 

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