ShiftNumber()

Format

ShiftNumber(Time [,Site] [,ShiftPattern])

Returns

Returns the number of the shift which was in effect at the provided Time.

Inputs

Time: The time for which to calculate the number of the shift.
Behaviour: Required
Dimension: Collection, SingleValue, MultiCollection
Valid data types: DateTime, Decimal, Integer, String

Note: You can use the Time() function to use a valid DateTime argument.

Site: Name of the site which contains the shift pattern to use. If this parameter is null or empty string, the default site will be used.
Behaviour: Optional
Dimensions: SingleValue
Valid data types: Null, String

ShiftPattern: Name of the shift pattern to use. If this parameter is null or empty string, the default shift pattern will be used.
Behaviour: Optional
Dimensions: SingleValue
Valid data types: Null, String

How to format data types

Examples

Expression: ShiftNumber(Time())
Result: Returns the number of the shift which was in effect at the provided Time for the default shift pattern of the default site.

Expression: ShiftNumber(Time(), 'Perth', 'Operations')
Result: Returns the number of the shift which was in effect at the provided Time for the 'Operations' shift pattern of the 'Perth' site.

Expression: ShiftNumber(Time(), null, 'Operations')
Result: Returns the number of the shift which was in effect at the provided Time for the 'Operations' shift pattern of the default site.

Release History

  • ShiftNumber() 4.10.2
    • Replaced optional TimeZone parameter with optional parameters to specify a site and shift pattern to be used in the calculation.
  • ShiftNumber() 4.6.5
    • Changed Time parameter to support MultiCollection values.
  • ShiftNumber() 4.0
    • Initial version

Comments are closed