How to calculate working hours (OutTime - InTime) in Process Studio?

Sample Data:
E101 | Ravi | 01-09-2024 | 9:00 | 18:30 | 250

Requirements:

  1. WorkingHours = OutTime - InTime

Approach 1: Using Calculator Step

Step 1: Convert Time Fields to Timestamp

First convert InTime and OutTime into Timestamp format.

  • Use Rename Field step.

  • Change the data type of InTime and OutTime to Timestamp.

This ensures that the system can correctly perform time calculations.

Step 2: Use Calculator Step

Add a Calculator step and create a new field:

WorkingTime = OutTime - InTime

This will calculate the time difference between InTime and OutTime.


Approach 2: Using Formula Step

If you only need the total working hours, you can use the Formula step.

Example formula:

Hours([OutTime] - [InTime])

This function calculates the difference between the two timestamps and returns the total working hours.