Converting the time format of the "Time spent (seconds)" column

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

The "Time spent (seconds)" column in the Jira "Issue worklog" table is a real data type column that captures the number of seconds logged by users on a Jira work item. To convert the logged time into the same format that you see in the “Time tracking” field or the work log in Jira, you can use this series of Visual SQL steps (replace "Time spent (seconds)" with the name of your column):

  1. After your query, add a Formula column step then select Custom as the formula type.

  2. Use the following SQLite formula to zero-fill rows with null values and cast the values as integers:

    1 CAST(coalesce("Time spent (seconds)",0) as INT)
  3. Use the Apply formula step on the custom formula you added, select Custom as the formula type, and use this SQLite formula:

    1 concat( "Time spent (seconds)"/144000, "w ", ("Time spent (seconds)"%144000)/28800, "d ", ("Time spent (seconds)"%28800)/3600, "h ", ("Time spent (seconds)"%3600)/60, "m")
A visual mode query includes the issue key column and the total sum of the Time spent (seconds) column. A formula column is added to adjust how the Time spent (seconds) column is summed. A second formula column is added to format the time spent in th

Note that the “Time tracking” field and work log record in Jira consider 8 hours to be 1 day and 5 days to be 1 week. For example,

9 hours

would show as

1d 1h

in Jira.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.