Clock In & Clock Out Time Duration Calculation In Asana

I am trying to create a time tracker in Asana that calculates the duration of a task. Users will use a form entry to “Clock In” and can “Clock Out” by completing the task. However, users may need to enter time entries after the fact (e.g. travel time, time onsite without internet access, etc.) so I have created a separate Clock In and Clock Out field outside of the “Created on” and “Completed on” auto-generated fields by Asana that are automated to be filled with the “Created on” and “Completed on” date (and time) unless the user fills out ad hoc data for the Clock In and Clock Out fields when submitting the form. While this automation works, when I use a simple equation (“Clock Out” - “Clock In”) to calculate task duration, I am getting a duration of 0 hours 0 minutes as it seems that the Created on and Completed on time is not being transferred into the Clock In and Clock Out fields respectively, just the date. Is there any way to either isolate the time from the “Created on” and “Completed on” auto-generated fields/the metadata in the Asana project? I am trying to keep everything in-house to Asana in order to use the dashboarding feature to see how time is being allocated for specific projects.

Additionally, in trying to export this data to a csv file, the date AND time are only pulled in when a user has entered in the time themselves. The Created On and Completed On time is also not being pulled in. Is there a way to also have the time for time fields including the Created on and Completed on fields included?

@Maya_Terhune - is there a reason you are doing this by form, instead of using the native time tracking field (Actual Time)? Guessing maybe it’s a budgetary constraint but just checking, as that would be a significantly easier, native approach.

If that’s a non-starter, could you share screenshot(s) of your form and rule (hide any private info)?

HI @Stephen_Li! We need to capture the start and end time for the task, which led me to use a form for time tracking rather than the native time tracking feature like Actual Time. When I try and pull in the Created On and Completed On data to the Clock In and Clock Out fields respectively, the automation successfully does this, but in trying to calculate duration (Clock Out - Clock In), the duration field is being populated with 0 hours and 0 minutes. The yellow highlights represent what should be calculated based on the Created On and Completed On time fields. I need the Clock In and Clock Out fields to be separate from the Created On and Completed On fields to allow users to adjust entries (e.g. forgetting to log a task “live” or forgetting to start or end a task at the correct time). Let me know if this makes sense. Thank you!


Gotcha, out of curiosity, is there a reason you’re using forms instead of just having them create/modify tasks in the platform?

Without seeing your rule setup, it’s hard to confirm this 100% but your issue is probably that the set due date rule action doesn’t let you grab the time dynamically (just the date) unless you use an AI action (not sure if you are on a plan that supports this).

We are using forms to make this more user-friendly. Would there be a different advantage to having them enter tasks in the platform? Users will edit tasks in the platform for adjusting Clock In/Clock Out time as needed (i.e. in the situation where they forget to Clock In or Clock Out or need to adjust their start/end time).

I have attached a screenshot of the automation for the Clock In feature (the Clock Out is the same but pulls in the Completed on data). The automation will pull in the Created on/Completed on date into the Clock In/Clock Out field, but it does not let you set a dynamic time equal to the Created on time (only a static value you set). I would need the date and time to be pulled in dynamically to this field. Would you be able to explain how an AI action would solve for this? Thank you!

If your plan is AI-enabled, I just tested this and you can prompt it with something like:

If the form submission doesn’t have an input for the CLOCKIN time field, set that field to the task’s creation date AND time. It’s extremely important that you include both date and time.

Then the rule is: When task is added from form submission → AI action above, set CLOCKIN

Hi @Stephen_Li! Thank you! I will take a look at this option. Would you have any additional recommended workarounds for this should I not be able to use AI Action?

I’m not allowed to use it personally (big org with super strict data policies) but @Phil_Seeman’s Flowsana might be able to do this (I see there’s a rule action for set a date). The upside is that rule action would be significantly less resource-wasteful than using AI for something this small, so perhaps a good option.

1 Like