SetTime
Description
Resets the value of the specified pbtime object.
Syntax
|
1 |
SetTime (pbtime time, pbint hour, pbint minute, pbdouble second) |
|
Argument |
Description |
|---|---|
|
time |
The pbtime object to be reset |
|
hour |
An hour in the range 0 to 23 |
|
minute |
A minute in the range 0 to 59 |
|
second |
A second in the range 0 to 59.999999 |
Return value
PBX_RESULT. PBX_OK for success or PBX_E_INVALID_ARGUMENT if the
new time is invalid.
Examples
This code puts a new time with the value 01:01:01 into the
time_val property of the pArguments array if the value in the PBCallInfo
structure is null. Otherwise it sets time_val to the time in the
PBCallInfo structure:
|
1 2 3 4 5 6 7 8 9 10 11 |
if (ci->pArgs->GetAt(i)->IsNull()) { pArguments[i].time_val = Session-> NewTime(); Session->SetTime(pArguments[i].time_val, 1, 1, 1); // Time: 01:01:01 } else { pArguments[i].time_val = ci-> pArgs-> GetAt(i)-> GetTime(); } |
Usage
If the parameters are invalid, the time is reset to
0:0:0.0.
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest