Help Center

COleDateTime.LET Operatoroperator

Assigns a value to a **COleDateTime** object.

DateTimeoperatorCOleDateTime.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

OPERATOR LET (BYREF dateSrc AS COleDateTime)
OPERATOR LET (BYREF varSrc AS VARIANT)
OPERATOR LET (BYVAL dtSrc AS DATE_)
OPERATOR LET (BYVAL timeSrc AS LONGLONG)
OPERATOR LET (BYREF systimeSrc AS SYSTEMTIME)
OPERATOR LET (BYREF filetimeSrc AS FILETIME)
OPERATOR LET (BYREF dbts AS DBTIMESTAMP)
OPERATOR LET (BYREF ud AS UDATE)
OPERATOR LET (BYREF wsz AS WSTRING)

Parameters

NameDescription
dateSrcAn existing COleDateTime object to be copied into the new COleDateTime object.
varSrcAn existing VARIANT data structure to be converted to a date/time value (VT_DATE) and copied into the new COleDateTime object.
dtSrcA date/time ( DATE) value to be copied into the new COleDateTime object.
timeSrcA LongInt value to be converted to a date/time value and copied into the new COleDateTime object.
systimeSrcA SYSTEMTIME structure to be converted to a date/time value and copied into the new COleDateTime object.
filetimeSrcA FILETIME structure to be converted to a date/time value and copied into the new COleDateTime object. Note that FILETIME uses Universal Coordinated Time (UTC), so if you pass a local time in the structure, your results will be incorrect. See File Times in the Windows SDK for more information.
dbtsA reference to a DBTimeStamp structure containing the current local time.
udThe UDATE value is converted and copied into this COleDateTime object. If the conversion is successful, the status of this object is set to valid; if unsuccessful, it is set to invalid. A UDATE structure represents an "unpacked" date. See the function VarDateFromUdate for more details.
wszA null-terminated unicode string which is to be parsed. This parameter can take a variety of formats. For example, the following strings contain acceptable date/time formats:
"25 January 1996"
"8:30:00"
"20:30:00"
"January 25, 1996 8:30:00"
"8:30:00 Jan. 25, 1996"
"1/25/1996 8:30:00" // always specify the full year, even in a 'short date' format.
Note that the locale ID will also affect whether the string format is acceptable for conversion to a date/time value. In the case of VAR_DATEVALUEONLY, the time value is set to time 0, or midnight. In the case of VAR_TIMEVALUEONLY, the date value is set to date 0, meaning 30 December 1899.

Description

Assigns a value to a COleDateTime object.

Reference

  • Include file COleDateTime.inc
  • Documented in DateTime/COleDateTime Class.md
  • Topic: COleDateTime Class