Convert Number to Time

S

Steved

Hello form Steved

In cell A1 I have 1445

I would like to in Cell B1 have 245 not 2:45 please
I would like to in Cell C1 have P if afternoon, A morning.

Ok I receive 1445 as a time. I would like to convert it to
245 P as this is how the Database time is inputed.

Thankyou.
 
B

Bob Phillips

Hello Steved,

This is an emended version for the hour part. I have also added a special
condition for 2400

=IF(R6=2400,1200,IF(R6<1300,MOD(R6,1300),MOD(R6,1200)))

Here also is amended for the A/P part, as I assume you want A for 1259

=IF(R6<1300,"A","P")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
S

Steved

Thankyou Bob.
-----Original Message-----
Hello Steved,

This is an emended version for the hour part. I have also added a special
condition for 2400

=IF(R6=2400,1200,IF(R6<1300,MOD(R6,1300),MOD(R6,1200)))

Here also is amended for the A/P part, as I assume you want A for 1259

=IF(R6<1300,"A","P")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)




.
 

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

Top