Excel formula to convert time.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, I Excel formula to convert time to seconds. for example/
<TABLE style="WIDTH: 151pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=200 border=0><COLGROUP><COL style="WIDTH: 53pt; mso-width-source: userset; mso-width-alt: 2560" width=70><COL style="WIDTH: 98pt; mso-width-source: userset; mso-width-alt: 4754" width=130><TBODY><TR style="HEIGHT: 12pt" height=16><TD class=xl63 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 53pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12pt; BACKGROUND-COLOR: transparent" align=right width=70 height=16>12:05:00 AM</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 98pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" align=right width=130> Expected asnwer= 300</TD></TR></TBODY></TABLE>.

Thanks in advance.
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
Hi Pedie!
If your time were in cell A1, how about something like:
Code:
=(1*86400)*A1
(Everything going good these days?)

Hope it helps.


EDIT:
I don't know if there's much of a difference, but you could (might want to???) write it this way instead:
Code:
=(86400/1)*A1
and in either case, I forgot to mention to format the cell as number instead of time.
 
Last edited:

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi Dan, perfect! both works great :).
and yes everything is going great!!!;)
i hope everything is going great for you too...are you already in PHP?
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
Nope. I'm not in the Philippines yet. (I likely will be a week or so from now though.) :cool:
 

Watch MrExcel Video

Forum statistics

Threads
1,126,986
Messages
5,621,993
Members
415,873
Latest member
fuulhouse

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top