Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with COleDateTime ...

Status
Not open for further replies.

daniloa

Programmer
Nov 23, 2001
27
BR
Hi, I'm making a OCX that I need to pass a date time value, how can I do it?

I always tried this but don't work:

long CMyClass::FunctionDate(DATE pDate, long pType)
{
COleDateTime(pDate) ct;
long mYear;
//
mYear = ct.GetYear();
}

how can I do it ???

Very Thanks,

Danilo ...
 
I do not know if it is a typing error, what you wrote here.
You wrote:
COleDateTime(pDate) ct;
which of course should be:
COleDateTime ct(pDate);


else you'll get errors like "ct: undeclared idetifier".
(another little thing I noticed is the name of pDate - is it really a pointer??? If yes (which I dont think) it could be that you have to add a '*' in front of pDate)

But I don't see any other errors, so it should work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top