PA_SetTimeField

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_SetTimeField (tNum; fNum; value)

ParameterTypeDescription
tNumshortTable number of the field to access
fNumshortField number of the field to access
valuelongNew value for the field

Description

The routine PA_SetTimeField sets the value of the time field number fNum of the current record of table number tNum to value.

If the field is not a time field, the routine does nothing and sets an error in PA_GetLastError().

NOTE

A 4D time is a long equal to a number of seconds.

Example

Set a time field.

   void foo (short tNum, short fNum, short hours, short minutes, short seconds)
   {
      PA_SetTimeField(tNum, fNum, (hours * 3600) + (minutes * 60) + seconds);
   }

See Also

PA_GetTimeField.

Error Handling

Use PA_GetLastError to see if an error occurred (eER_InvalidFileNumber, eER_InvalidFieldNumber).


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next