1

I have to design a page with a table for an audit log, and one of the columns is the Timestamp. I am torn on how to handle this however, and I find examples of both on the web.

A) Without line break

2020-12-20  01:59:20 GMT+8

or

B) With line break

2020-12-20
01:59:20 GMT+8

What would be the best practice in this case?

1 Answer 1

1

I'd definitely go for option A. It makes it much easier to see that certain events happened close together, as can be seen from this example:

2020-12-20  02:45:30 GMT+8
2020-12-20  01:59:30 GMT+8
2020-12-20  01:59:26 GMT+8
2020-12-20  01:59:24 GMT+8
2020-12-20  01:59:20 GMT+8
2020-12-20  00:45:30 GMT+8
2020-12-20
02:45:30 GMT+8
2020-12-20
01:59:30 GMT+8
2020-12-20 
01:59:26 GMT+8
2020-12-20 
01:59:24 GMT+8
2020-12-20
01:59:20 GMT+8
2020-12-20
00:45:30 GMT+8

If you lack the horizontal space for this, consider dropping the timezone indication (but show it in the table footer), use a shorter date time format (e.g. "Dec 20, 01:59") or do use option B, but show the date only when it changes, e.g.

2020-12-21
08:15:10 GMT+8
2020-12-20
02:45:30 GMT+8
01:59:30 GMT+8
01:59:26 GMT+8
01:59:24 GMT+8
01:59:20 GMT+8
00:45:30 GMT+8
2020-12-19
16:15:10 GMT+8

The ability to quickly compare them matters less when showing only a single log, e.g. on a detail page or as a tooltip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.