How do I convert...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a formula (function?), that converts a number - say...1022 - to a time
format like this: 10:22. Is this possible? TIA
 
if the number is in B1

=TIME(B1/100,MOD(B1,100),0)

note that this works in the 24 hour clock and does not deal with am/pm

if you want am pm then you need to adjust the hours by 12 by

=TIME(B1/100--(C1="PM")*12,MOD(B1,100),0)

assuming that AM or PM is in C1.

Hope this helps
Martin Fishlock
Please do not forget to rate this reply.
 
Certainly it's possible.

Try something like:

=time(int(a1/100),mod(a1,100),0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top