ProdTimeUnitOfMeasure::convertToTimeUnitCalendarId Method
Converts a value in a particular unit of measure to a selected time unit by using the specified calendar and module parameters configuration.
Syntax
client server public static real convertToTimeUnitCalendarId(
CalendarId _calendarId,
RefRecId _fromUnitOfMeasure,
real _value,
ProdTimeUnitType _toTimeUnitType,
[ItemId _itemId])
Run On
Called
Parameters
- _calendarId
Type: CalendarId Extended Data Type
The calendar to use.
- _fromUnitOfMeasure
Type: RefRecId Extended Data Type
The source unit of measure.
- _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 that is used for product-specific conversion; optional.
Return Value
Type: real
A converted value if a conversion exists; otherwise, 0.
Remarks
A day is interpreted not as a 24 hour period, but as defined by the StandardWorkDay field of the WorkCalendarTable table.