DVARIANT.ToDosDateTimemethod
Extracts a date and time value in Microsoft MS-DOS format from a DVARIANT of type VT_DATE.
Syntax
FUNCTION ToDosDateTime (BYVAL pwDate AS USHORT PTR, BYVAL pwTime AS USHORT PTR) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
pwDate | When this function returns, contains the extracted USHORT that represents a MS-DOS date. | |
pwTime | When this function returns, contains the extracted contains the extracted WORD that represents a MS-DOS time. |
Return value
If this function succeeds, it returns S_OK (0). Otherwise, it returns an HRESULT error code.
Description
Extracts a date and time value in Microsoft MS-DOS format from a DVARIANT of type VT_DATE.
Remarks
This helper function is used when the calling application expects a DVARIANT to hold a datetime value.
If DVARIANT is of type VT_DATE, this function extracts the datetime value.
If DVARIANT is not of type VT_DATE, the function attempts to convert the value in the VARIANT structure into the right format. If a conversion is not possible, it returns a failure code.
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:1943
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class