I need help converting a PHP variable to a Date type for a COM function parameter. (Yes, I know PHP has weak typing... that's the problem.) Passing a value to the COM object's function (CrystalReports XI ParameterField -> AddCurrentValue(), if that matters to you) works if the object is expecting a number or a string... However, if it is expecting a Date I cannot use a PHP string or the VT_DATE variant, it seems. All of the sample code in VB or for ASP takes advantage of the Microsoft function CDate() to convert a string to a Date Type. Right now I'm trying something like: $dt = variant_date_from_timestamp($timestamp); $vVal = new VARIANT($dt, VT_DATE); $this->param->AddCurrentValue($vVal); The last line throws a com_exception. Any one else come across this or have any hints as to how it can be worked around? - James -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php