Conventions for formatting the elapsed time?

I have an elapsed time (to the nearest millisecond) and would like to format it for human consumption.

For example:

  • 500 ms = 500 ms
  • 1500 ms = 1.5 s
  • 90000ms = 1m30s (or 90s?)
  • 2790000ms = 46m30s


Are there any UX policies for the different breaks? When do I switch from milliseconds to split seconds? From seconds to minutes?

Actually, I have two types of elapsed times: the first ones are usually in the order of seconds (it took ~ 4 seconds for something to go); The seconds are on the order of ten minutes (the total time was ~ 45 minutes, not more than 90 minutes). Does that make a difference?

Suppose British English.

sql – calculation of elapsed time

The following code compares recv.rcpt_dtim (a datetime type) to the current date / time. It calculates an elapsed time, formatted in hours and minutes as follows: "04:22". It took me a while to make it work, which it is, but it just seems sloppy. Does anyone have any tips for tidying up?

TRIM (((((CURRENT YEAR TO SECOND - recv.rcpt_dtim) :: INTERVAL SECOND (9) to
SECOND) / 3600) :: VARCHAR (12) || & # 39:;; & # 39 || CASE IF (MOD (MOD ((CURRENT YEAR TO
MINUTE - recv.rcpt_dtim) :: INTERVAL MINUTE (9) to
MINUTE) :: VARCHAR (12) :: INT, 60), 60)) <10 THEN "0" ELSE "" END ||
(MOD (MOD (((NEWS YEAR TO MINUTE - recv.rcpt_dtim) :: INTERVAL MINUTE (9)
to MINUTE) :: VARCHAR (12) :: INT, 60), 60)) :: VARCHAR (12))

Google Sheets specifies how the elapsed time is calculated between two cells that contain the date and time and are displayed in days and hours

Try the following:

= Split time (days (B2, A2) & "day" & time (B2) - time (A2), ",")

days allows you to figure out the difference between two days value gives you the duration between two times as you need to extract them from your cells. I would use then Splits To put the duration in a separate column, since formats, as far as I know, can only be applied to a single cell

you could just use it too = Days and subtract the end date from the beginning to get the hours, but it will not take days.