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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM 1

Status
Not open for further replies.

sheronne

Programmer
Jun 1, 2001
71
US
Here is an excerpt from my com object:

Define Class MyTools As Session OlePublic
r_date = {}

Function MyFunction
&&Do something
Endfunc
Enddefine

I register the com with windows, then I called it using the following code:

ox = createobject("mycom.mytools")
ox.r_date = DATE()

When I set the r_date property, it stores the date as:
07/06/03 12:00:00 AM
Instead of what I want which is :
07/06/03
Minus the time. Any ideas why the time is added to the property?

Thanks
 


I'm not sure why this is happening, but if you consistently get a datetime, the subtring it with

? TTOD(r_date)

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Dates are not supported in COM. It supports DateTime.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Craig,

I didn't know that was an across the board kind of thing... star for you.

Slighthaze = NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top