Microsoft KB Archive/190541

= PRB: DATE Returns a DateTime Type Value From OLE Server =

Article ID: 190541

Article Last Modified on 8/25/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q190541



SYMPTOMS
The DATE function returns a data type of Time when evaluated from an OLE Server or COM object. This behavior is by design because the Date data type is converted to an OLE variant type during the evaluation.



RESOLUTION
The workaround to this behavior is to convert the return value via the TTOD (Time to Date) function, for example: ?TYPE('TTOD(_VFP.EVAL("DATE"))') && This returns "T" for Time



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  In the Command window, issue the following: ?TYPE('DATE')             && This returns "D" for Date ?TYPE("_VFP.EVAL('DATE')") && This returns "T" for Time 

NOTE: In the example above, the return value from the second line is the same that you would get from any COM object created in Visual FoxPro.

Additional query words: kbVFp500a kbVFp500 kbVFp600 kbCOMt

Keywords: kbprb KB190541

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.