Skip to content

Formulas for bytes and duration

wordpress meta

title: 'Formulas for bytes and duration'
date: '2019-12-14T11:40:53-06:00'
status: publish
permalink: /formulas-for-bytes-and-duration
author: admin
excerpt: ''
type: post
id: 1440
category:
    - formula
    - restic
tag: []
post_format: []

Capturing a couple formulas for future reference. I was using restic backup stats and wanted to convert the time a job ran into hours and minutes. Also convert bytes process to TB.

bytes to TB example:
total_bytes_processed: 5773378 / 1000000000000 == 1.502888851889

duration to HH:MM example using libre calc:
total_duration: 15870.197288027 / 86400 and then Format Cell > Time > HH:MM:SS will show 04:24:30