<< Click to Display Table of Contents >> AdoDateTime Class |
![]() ![]() ![]() |
This class is used by Vo2Ado to store the DateTime values that are returned by ADO.
CLASS AdoDateTime
Constructor
Init() Create a new object of type AdoDateTime
DateVal The value of the date part of the DateTime object
TimeString The string value of the time part of the DateTime object
TimeVal The numeric value of the time part of the DateTime object
Assign
DateVal The value of the date part of the DateTime object
TimeString The string value of the time part of the DateTime object
TimeVal The numeric value of the time part of the DateTime object
Method
AsReal8() Returns the dateTime value as Real8
AsString() Returns the dateTime value as String
// This example shows how to access and assign date and time values
// To seperate controls.
// We are assuming you have told Vo2Ado to return datetime values
// as a datetime object, by calling: AdoDateTimeAsDate(FALSE)
// The sample also assumes there are 2 controls on the form to hold
// the values.
METHOD Notify(kNot, uDesc) CLASS MyWindow
LOCAL oDateTime as AdoDateTime
LOCAL uRet as USUAL
uRet := super:Notify(kNot, uDesc)
IF kNot >= NOTIFYRECORDCHANGE
oDateTime := SELF:server:Fieldget(#OrdDate)
Self:oDcOrderDate:Value := oDateTime:DateVal
Self:oDcOrderTime:Value := oDateTume:TimeString
ENDIF
RETURN uRet
METHOD Commit() CLASS MyWindow
local oDateTime as AdoDateTime
oDateTime := AdoDateTime
oDateTime:DateVal := Self:oDcOrderDate:Value
oDateTime:TimeString := Self:oDcOrderTime:Value
SELF:Server:FieldPut(#OrdDate, oDateTime)
RETURN Super:Commit()