ProdTimeUnitOfMeasure::convertTimeUnit Method
Converts a value from one time unit to another time unit by using the module parameters configuration.
Syntax
client server public static real convertTimeUnit(
ProdTimeUnitType _fromTimeUnitType,
real _value,
ProdTimeUnitType _toTimeUnitType,
[ItemId _itemId])
Run On
Called
Parameters
- _fromTimeUnitType
Type: ProdTimeUnitType Enumeration
The source unit type.
- _value
Type: real
The value to convert.
- _toTimeUnitType
Type: ProdTimeUnitType Enumeration
The desired output time unit type.
- _itemId
Type: ItemId Extended Data Type
An item used for product-specific conversion; optional.
Return Value
Type: real
A converted value if a conversion exists; otherwise, 0.
Exceptions
Exception | Condition |
---|---|
Error | A required unit of measure is not set up. |