PA_GetTimeField

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

version 2003


PA_GetTimeField (tNum; fNum) long

ParameterTypeDescription
tNumshortTable number of the field to access
fNumshortField number of the field to access
Function resultlongValue of the field (number of seconds)

Description

The routine PA_GetTimeField returns the value of the time field number fNum of the current record of table number tNum.

NOTE

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

If the field is not a time field, the routine returns 0 and an error code in PA_GetLastError.

Example

Check the value of a field.

   short   value;
   value = PA_GetTimeField( 1, 3 );
   if ( PA_GetLastError() == eER_NoErr )
   {
   // If less than a minute do something
      if ( value <= 60 )
      {
         /* . . . */
      }
   }

See Also

PA_SetTimeField.

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