Ask Your Question

Display number in seconds [closed]

I have a column with computation times in milliseconds. However, I would like to display this column in seconds, without modifying the columns' contents.

Example: Current Data: 972 244 430 300075 2863

How I would like to display this: 0 0 0 300 2

So basically I would like to drop the last 3 digits. I tried using the format data code: "#," but this doesn't give the desired result. Whenever the original number is less than 1000, I would simply get an empty cell as if the data was missing.

Alternatively, this would also be a good solution: 1 0 0 300 3

These numbers are obtained by dividing the original number by 1000 and rounding to the nearest integer value. This can easily be achieved by creating an extra column, but that seems to me a rather ugly solution?

edit retag reopen merge delete

2 Answers

Sort by » oldest newest most voted

I tried "0," and it worked. BTW using 4.1.2.3 value 975 with "#," or "0," results in "1" not "0".

more

It's possible to get this by putting your thousands separator at the end of the format.

E.g. the format:
[>0]#.##0,0.;[<0]-#.##0,0.;"­ ­"
shows 41200 as 41,2 being the dot the thousands separator

In LibreOffice help:
Thousands Separator
Depending on your language setting, you can use a comma or a period as a thousands separator.
You can also use the separator to reduce the size of the number that is displayed by a multiple of 1000.
Number Format
Code "#,###" -> 15000 as 15,000
Code "#," -> 16000 as 16

more

Comments

When I try this: [>0]#.##0,0.;[<0]-#.##0,0.;"­ ­" on the number 300075, I get: 300,075.0000 This certainly doesn't remove the last 3 digits? In fact, it adds a lot of digits :). When I try this: #, on the number 300075 I get 300 which is exactly what I want. BUT, when I try the same thing on the number 972, I get an empty cell instead of the number 0, so this doesn't work either.

( 2013-11-13 00:12:02 +0100 )edit

Stats

Asked: 2013-11-12 21:27:01 +0100

Seen: 123 times

Last updated: Nov 13 '13