PA_SetTimeField


version 2003


PA_SetTimeField (tNum; fNum; value)

Parameter Type Description
tNum short Table number of the field to access
fNum short Field number of the field to access
value long New 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 ).