Skip to main content

Conas milleasoicindí a thiontú go ham in Excel?

Mar is eol dúinn uile, is ionann aon soicind agus 1000 milleasoicind idir na haontuithe ama, an t-alt seo, labhróidh mé faoi conas milleasoicindí a thiontú go hh: mm: ss am in Excel.

Tiontaigh milleasoicindí go hh: mm: ss am leis an bhfoirmle


mboilgeog cheart gorm saighead Tiontaigh milleasoicindí go hh: mm: ss am leis an bhfoirmle

Chun na milleasoicindí a thiontú go ham, is féidir leis an bhfoirmle seo a leanas fabhar a dhéanamh duit:

Cuir an fhoirmle seo isteach sa chill bhán más mian leat an toradh a aschur:

=CONCATENATE(TEXT(INT(A2/1000)/86400,"hh:mm:ss"),".",A2-(INT(A2/1000)*1000)), agus ansin tarraing an láimhseáil líonta síos go dtí na cealla ar mhaith leat an fhoirmle seo a chur i bhfeidhm, agus athraíodh gach milleasoicind sna cealla go ham, féach an scáileán:

athraíonn sé milleasoicindí go ham 1

Uirlisí Táirgiúlachta Oifige is Fearr

🤖 Kutools AI Aide: anailís sonraí a réabhlóidiú bunaithe ar: Forghníomhú Chliste   |  Gin Cód  |  Cruthaigh Foirmlí Saincheaptha  |  Anailís a dhéanamh ar Sonraí agus Cairteacha a Ghin  |  Feidhmeanna Kutools a agairt...
Gnéithe Coitianta: Faigh, Aibhsigh nó Aithnigh Dúblaigh   |  Scrios Sraitheanna Bána   |  Comhcheangail Colúin nó Cealla gan Sonraí a Chailleadh   |   Babhta gan Foirmle ...
Cuardaigh Super: Ilchritéir VLookup    VLookup Illuachanna  |   VLookup Trasna Ilbhileoga   |   Amharc doiléir ....
Liosta anuas Casta: Go tapa Cruthaigh Liosta Anuas   |  Liosta anuas Cleithiúnach   |  Liosta Buail Isteach Ilroghnacha ....
Bainisteoir Colún: Cuir Líon Sonrach Colún leis  |  Colúin Bog  |  Scoránaigh Stádas Infheictheachta na gColún Ceilte  |  Déan comparáid idir Raonta & Colúin ...
Gnéithe Réadmhaoin: Fócas Eangaí   |  Amharc Dearaidh   |   Barra Mór na Foirmle    Leabhar Oibre & Bainisteoir Bileog   |  Leabharlann Acmhainní (Uaththéacs)   |  Piocálaí Dáta   |  Comhcheangail Bileoga Oibre   |  Criptigh/Díchriptigh Cealla    Seol Ríomhphost trí Liosta   |  Scagaire Super   |   Scagaire Speisialta (scagaire trom/iodálach/stailc tríd...) ...
Barr 15 Uirlisí12 Téacs uirlisí (Cuir Téacs, Bain Carachtair,...)   |   50 + Cairt cineálacha (Cairt Gantt,...)   |   40+ Praiticiúil Foirmlí (Ríomh aois bunaithe ar lá breithe,...)   |   19 Insertion uirlisí (Cuir isteach Cód QR, Ionsáigh Pictiúr ón gCosán,...)   |   12 Tiontú uirlisí (Uimhreacha le Focail, Comhshó Airgeadra,...)   |   7 Cumaisc & Scoilt uirlisí (Sraitheanna Comhcheangail Casta, Cealla Scoilt,...)   |   ... agus eile

Supercharge Do Scileanna Excel le Kutools le haghaidh Excel, agus Éifeachtúlacht Taithí Cosúil Ná Roimhe. Kutools le haghaidh Excel Tairiscintí Níos mó ná 300 Ardghnéithe chun Táirgiúlacht a Treisiú agus Sábháil Am.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

Tuairisc


Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Quando eu tento usar a formula, o Excel apresenta um erro como se eu não estivesse querendo fazer uma formula. Estou copiando exatamente a formula original do post
This comment was minimized by the moderator on the site
Hello Matheus,
Sorry to hear that. In Portugal and Spain, commas in the formula should be replaced by semicolons. So the formula should be =CONCATENATE(TEXT(INT(A2/1000)/86400;"hh:mm:ss");".";A2-(INT(A2/1000)*1000)). Please have a try. Look forward to your reply.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
In Excel is easy: =(A2/1000/3600)*"01:00:00"

Set for cell B2 own format number (for 3 decimal places) : hh:mm:ss.000;@
or
Set for cell B2 own format number (for 1 decimal place) : hh:mm:ss.0;@       (Round up for one decimal place)
This comment was minimized by the moderator on the site
In Excel is easy: =(A2/1000/3600)*"01:00:00"
Set B2 format number own (for 3 decimal places) : hh:mm:ss.000;@orSet B2 format number own (for 1 decimal places) : hh:mm:ss.0;@
This comment was minimized by the moderator on the site
Hello ,How are you. I think I know now how to set the format to 3 decimal places or 1 decimal place. Just apply a custom number format to the result. Your advice really helps. Thanks!Sincerely,Mandy
This comment was minimized by the moderator on the site
Hello ,Thank you for your comment. Indeed, your formula is simplier. I enter your formula =(A2/1000/3600)*"01:00:00" into cell B2, and apply the Time format among the number formats. The result format becomes hh:mm:ss. Please see the screenshot. But I can't set the results to 3 decimal places or 1 decimal place. Any way, thank you for your advice.
This comment was minimized by the moderator on the site
Let me rephrase that last question:
"My question here is how do I right the equation so that any number of milliseconds less that 172,800,00 equals the right number of days?"

I meant to type:

My question here is how do I right the equation so that any number of milliseconds more than 172,799,999.00
equals the right number of days?
This comment was minimized by the moderator on the site
This is a very helpful discussion for me. I found Rob Bell's and Jan Hook's previous posts such a great help to the initial tutorial. I needed the additional "day" column to count out my milliseconds which were over the 84,000,000 per day. So I modified Robs easy equation to say, "=TEXT(A1/86400000,"dd:hh:mm:ss.000")." I also used Jan's second equation posted. Funny thing though, on google sheets, when I use the expression on 0ms, the result is 30:00:00:00.000, instead of 00:00:00:00.000. When I try the expression on 1ms, the result is 30:00:00:00.001, instead of 00:00:00:00.001. When I try the expression on 99999999ms, the result is 31:03:46:39.999. When I try the expression on 1111111111ms, the result is 11:20:38:31.111. Notice that all of these except the 1111111111ms begins with a "3", such as 2ms=30:00:00:00.2. It seems to me that strangely the expression "=TEXT(A1/86400000,"dd:hh:mm:ss.000"), and Jan's longer version both result in throwing off the math by exactly 30 days, until the 172,800,000ms, at which time the 30 days drops off, and the expression reports a result of 01:00:00:00.000.

My question here is how do I right the equation so that any number of milliseconds less that 172,800,00 equals the right number of days?
This comment was minimized by the moderator on the site
The simplest/ easiest expression to do this (based on Florian's post below) is =TEXT(A1/8400000,"hh:mm:ss.000")
This comment was minimized by the moderator on the site
You can get the original formula to work by modifying the millisecond portion of the formula to include the text function to format as follows: =CONCATENATE(TEXT(INT(A1/1000)/86400,"hh:mm:ss"),".",TEXT(A1-(INT(A1/1000)*1000),"000"))
If you need to allow for days you can do the following:
=CONCATENATE(TEXT(INT(A1/1000)/86400,"dd:hh:mm:ss"),".",TEXT(A1-(INT(A1/1000)*1000),"000"))
This comment was minimized by the moderator on the site
Hello Jan Hook,Thank you so much for your advice. It helps and corrects the tiny portion of mistakes in our formula. We appreciate your effort and would love to take your advice. Thanks again.Sincerely,Mandy
This comment was minimized by the moderator on the site
Thanks for this all!

=CONCATENATE(TEXT((A1/1000)/86400,"[hh]:mm:ss"))

Is what worked for me as I was looking to round up the milliseconds.

Example of 230947 ms
The original format gave: 00:03:50.947
The format I got rounds up: 00:03:51

Cheers!
This comment was minimized by the moderator on the site
But how do we change the data type into duration. This 100% converts into mm:ss but how do we convert to duration data type
This comment was minimized by the moderator on the site
this produces some errors in some cases (I've not bothered to figure out why or in what cases, but it messed up in about 10% of my rows. Instead, divide the millisecond by 86400000, for example with

=(A1/86400000)

then apply a custom number format to the new value, such as:

[hh]:mm:ss.000

..this worked fine for me in 100% of my rows.
This comment was minimized by the moderator on the site
Hello ,Thank you for your advice. And sorry for the inconvenience. WBest regards,
Mandy
This comment was minimized by the moderator on the site
There's an error in this formula. Note row 6 of the screenshot. 6604545009 should convert to 10:35:45:009. However it the formula incorrectly converts this to 10:35:45:900. 009 vs 900 milliseconds.
This comment was minimized by the moderator on the site
Hello Gautam,Thank you for your comment. You are absolutely right. And we will correct this error soon. Thanks again!Best regards,Mandy
This comment was minimized by the moderator on the site
is this true? Because 79000231 seems to me that this is shorter than 100121211012 but it is longer when you convert it to hh:mm:ss
This comment was minimized by the moderator on the site
Hello Mirjam,How are you. The reason why the shorter 79000231 converts longer results than 100121211012 is that the format dismisses the days. When the format becomes dd/hh/mm/ss, you will see what I mean. Please see the screenshot.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations