What do I need to include to use SqlDateTime?

How doIutilize the SqlDateTime structure in my visual studio c++ application. Is there a header file or namespace I need to include at the top of my code? I've tried to put in a namespace but am told it does not exist.

I'm reading the datetime in from a sql database but need to compare it to the current time the program is ran to make appropriate updates.

Thanks

Micah

[412 byte] By [MicahF] at [2008-1-7]
# 1

What kind of data access engine are you using?

If you are using the OLE DB Provider, look into Oledb.h

ShengJiang at 2007-10-2 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
I already have oledb.h included in the program. In essence the problem is that I'm having to use the SqlDateTime structure because COleDateTime cannot parse the DateTime string from the SQL server because it contain the year first. COleDateTime looks like 6/1/2007 8:40.000 while the date read in from the SQL server comes in as 2007/6/1 8:40.000. The causes an overflow in the date column in COleDateTime date variable.

I appreciate your help.

Micah

MicahF at 2007-10-2 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
Why you need to convert it to string in the first place? Review your data retrieve code.
ShengJiang at 2007-10-2 > top of Msdn Tech,Visual C++,Visual C++ General...