Search the Community
Showing results for tags 'states'.
Hi, I'm having trouble with unit conversion when doing state assignments at a source. There are two different cases where this problem appears in the model: Subtracting TimeNow minus a Date Time state variable (ModelEntity.stWaitingListEntryDate) Although the specified unit for this property is 'Days', the assigned value is in hours and the unit is also 'Hours'. If I manually convert it by dividing by 24, the assigned value is in days, but the displayed unit is still ‘Hours’. Unit conversion issue when assigning a new value to a state variable from a data table Although the PatientsData.MaxWaitingTime is a real property with default unit ‘Days’, the assigned value to the state variable is converted to ‘Hours’. As in the first case, if I manually convert it by dividing by 24, the assigned value is in days, but the displayed unit is still ‘Hours’. In the attached model (time_units_conversion.spfx) you will find a simple example where you can see this in more detail. Any suggestions to solve this issue will be highly appreciated. Thank you and best regards, Nicolina