I have start Time and end Time like shift wise so, I have used the numeric field. for the start and end time so need to calculate duration. But i am not sure to get the correct format. of time like I need only hours and minutes. I need to entry the **start and end time Manual. I need format of of time in hours and minutes. After that need to display the End Time - Start Time in the duration last column
I need to enter the shift timing. Manual From Scada
this what exactly look like in vision. same has I need to do it in perspective.
Quite difficult to understand which component need to use un perspective.
Getting doubts on what format I need to use. for entering manual, form the ignition in HH=hours & MM=minutes. It's shouldn't exceed more than 24hours Start Time or End Time. Per shift 8hrs. but some time alternative shift will reduce or exceed their time. Duration will be calculated by the
expression like end time - minus start time
This can be accomplished using dateTimeInputs for the start and end time and a label for the duration:
You can either keep the arrows or hide them
setup for dateTimeInputs:
To hide the spinner arrows just set the style of the component to: { "overflow": "hidden" } Note: you need to make the dateTimeInput small enough vertically for the overflow:hidden prop to hide the arrows
here's the expression I'm using for the duration label:
if(
{../startDate.props.value} > {../endDate.props.value}, // date spans into next day
stringFormat("%02d:%02d",
hoursBetween({../startDate.props.value}, addDays({../endDate.props.value}, 1)),
minutesBetween({../startDate.props.value}, addDays({../endDate.props.value}, 1)) % 60
),
stringFormat("%02d:%02d",
hoursBetween({../startDate.props.value}, {../endDate.props.value}),
minutesBetween({../startDate.props.value}, {../endDate.props.value}) % 60
)
)