ProdTimeUnitOfMeasure::convertFromTimeUnit Method
Converts a value from a selected time unit to a particular unit of measure by using the module parameters configuration.
Syntax
client server public static real convertFromTimeUnit(
ProdTimeUnitType _fromTimeUnitType,
real _value,
RefRecId _toUnitOfMeasure,
[ItemId _itemId])
Run On
Called
Parameters
- _fromTimeUnitType
Type: ProdTimeUnitType Enumeration
The desired output time unit type.
- _value
Type: real
The value to be converted.
- _toUnitOfMeasure
Type: RefRecId Extended Data Type
The source unit of measure.
- _itemId
Type: ItemId Extended Data Type
An item that is 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. -or- A required unit of measure is not set up. |