note 91059 added to function.variant-set-type
| From: | martin at itmission dot com | Date: | Fri, 22 May 2009 17:55:07 +0000 |
| Subject: | note 91059 added to function.variant-set-type | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-155895@lists.php.net to get a copy of this message | ||
In my application I was using ADODB to retrieve data from Microsoft Access. During queries, fields
defined as "Date/Time" in Access were being returned to PHP as instances of the Variant
class.
For some reason, the variant_date_to_timestamp function returned incorrect timestamps. As a
workaround, I used variant_set_type($variant, VT_BSTR) to get a string representation of the date.
This can be used for most variant types PHP doesn't handle.
----
Server IP: 216.235.13.26
Probable Submitter: 206.186.1.38
----
Manual Page -- http://www.php.net/manual/en/function.variant-set-type.php
Edit -- https://master.php.net/note/edit/91059
Del: integrated -- https://master.php.net/note/delete/91059/integrated
Del: useless -- https://master.php.net/note/delete/91059/useless
Del: bad code -- https://master.php.net/note/delete/91059/bad+code
Del: spam -- https://master.php.net/note/delete/91059/spam
Del: non-english -- https://master.php.net/note/delete/91059/non-english
Del: in docs -- https://master.php.net/note/delete/91059/in+docs
Del: other reasons-- https://master.php.net/note/delete/91059
Reject -- https://master.php.net/note/reject/91059
Search -- https://master.php.net/manage/user-notes.php