+ Reply to Thread
Results 1 to 85 of 85

Decimal to 24 hour clock please.

  1. #1
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    (24*60))

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  2. #2
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Thanks Harlan.

    "Harlan Grove" wrote:

    > "Steved" <[email protected]> wrote...
    > >Hello from Steved
    > >
    > >1.43 to 1343
    > >9.52 to 2152
    > >3.17 to 1517
    > >I have the above in decimal please a formula to 24hour clock as above
    > >
    > >ie 3.17 to become 1517 not 15.17

    >
    > Far & away the shortest and fastest way would be
    >
    > =(x+12)*100
    >
    >
    >


  3. #3
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    > Don't feel bad.


    Not at all <g>. But of course, I must be accountable for the earlier goofy,
    flawed attempts to help the OP. Harlan was spot on with his suggestion to
    the OP and his descripts/comments on my earlier efforts. All are accepted
    in good spirit.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  4. #4
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Don't feel bad.

    I once created an uber formula (that did work) and Daniel M. did the same
    thing to me!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > "Biff" <[email protected]> wrote
    > ...
    >> >Your approach is so flawed it's breathtaking.

    >> Nice one! <vbg>

    > I'll second that ! <vbg>
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  5. #5
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    ....
    > >Your approach is so flawed it's breathtaking.

    > Nice one! <vbg>

    I'll second that ! <vbg>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  6. #6
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Yes, I know, Biff.
    It was my eyes and my mind (both need some repair <g>)
    Pl see responses given in the other branches.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  7. #7
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    >Your approach is so flawed it's breathtaking.

    Nice one! <vbg>

    Biff

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > "Max" <[email protected]> wrote...
    >>Sorry, further testing reveals that the earlier revised formula is still

    > not
    >>robust enough. Try this 2nd revision below:

    > ...
    >>=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >>(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >>SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >>SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >>/(24*60),"h:mm"))+0.5))

    > ...
    >
    > You're completely missing the point. You're fixated on returning Excel
    > time
    > values when the OP needs either integers or numeric strings that look like
    > integers. And he needs them as cell *VALUES*, not what's displayed.
    >
    > Even if the OP needed time values, you've still completely missed the
    > point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")
    >
    > Your approach is so flawed it's breathtaking.
    >
    >




  8. #8
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Harlan Grove" <[email protected]> wrote
    ....
    > Your approach is so flawed it's breathtaking.


    Yes, I know. Thanks, Harlan.
    You probably just missed my post to trash it all ..

    > Even if the OP needed time values, you've still completely missed the

    point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")


    Point noted, thanks !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  9. #9
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Max" <[email protected]> wrote...
    >Sorry, further testing reveals that the earlier revised formula is still

    not
    >robust enough. Try this 2nd revision below:

    ....
    >=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >/(24*60),"h:mm"))+0.5))

    ....

    You're completely missing the point. You're fixated on returning Excel time
    values when the OP needs either integers or numeric strings that look like
    integers. And he needs them as cell *VALUES*, not what's displayed.

    Even if the OP needed time values, you've still completely missed the point.
    If hours are separated from minutes by a period, all that's needed to
    convert to time in PM is

    =--SUBSTITUTE(x+12,".",":")

    Your approach is so flawed it's breathtaking.



  10. #10
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* all earlier suggestions, please.
    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)

    See Harlan's offering ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  11. #11
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* it all, please.

    See Harlan's offering ..

    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  12. #12
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    2nd revision ..

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  13. #13
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Sorry, further testing reveals that the earlier revised formula is still not
    robust enough. Try this 2nd revision below:

    Assuming the decimals are in A1 down

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello Max from Steved
    >
    > I need 6.30 to be 1830
    >
    > Your Formula gives me 0.252083333
    >
    > The reason for 1830 is that oracle understands 1830 is 6:30 pm
    >
    > Hopefully you can work this out for me and thankyou.




  14. #14
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Steved" <[email protected]> wrote...
    >Hello from Steved
    >
    >1.43 to 1343
    >9.52 to 2152
    >3.17 to 1517
    >I have the above in decimal please a formula to 24hour clock as above
    >
    >ie 3.17 to become 1517 not 15.17


    Far & away the shortest and fastest way would be

    =(x+12)*100



  15. #15
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    Maybe something like this:

    =(INT(A1)+12&MOD(A1,INT(A1))*100)*1

    Format as GENERAL

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  16. #16
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi Max!

    Not working for me.

    The formula is returning the decimal equivalents and when formatted as TIME
    13:30 displays as TIME AM

    1:43
    9:52
    3:17

    If I add 12 hrs it works!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hello from Steved
    >>
    >> 1.43 to 1343
    >> 9.52 to 2152
    >> 3.17 to 1517
    >> I have the above in decimal please a formula to 24hour clock as above
    >>
    >> ie 3.17 to become 1517 not 15.17
    >>
    >> Thankyou

    >
    >




  17. #17
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    I've re-posted the revised formula in the other response, re:

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down

    That should do it ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  18. #18
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    ugh, sorry, scratch that suggestion ..
    mis-read your post
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  19. #19
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Hello Max from Steved

    I need 6.30 to be 1830

    Your Formula gives me 0.252083333

    The reason for 1830 is that oracle understands 1830 is 6:30 pm

    Hopefully you can work this out for me and thankyou.

    "Max" wrote:

    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello from Steved
    > >
    > > 1.43 to 1343
    > > 9.52 to 2152
    > > 3.17 to 1517
    > > I have the above in decimal please a formula to 24hour clock as above
    > >
    > > ie 3.17 to become 1517 not 15.17
    > >
    > > Thankyou

    >
    >
    >


  20. #20
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    This seems to do it ..

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  21. #21
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    If:

    1.43 = 1343 PM

    What would:

    1.43 = ???? AM

    And how do you distinguish one from the other?

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  22. #22
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Sorry, further testing reveals that the earlier revised formula is still not
    robust enough. Try this 2nd revision below:

    Assuming the decimals are in A1 down

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello Max from Steved
    >
    > I need 6.30 to be 1830
    >
    > Your Formula gives me 0.252083333
    >
    > The reason for 1830 is that oracle understands 1830 is 6:30 pm
    >
    > Hopefully you can work this out for me and thankyou.




  23. #23
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Thanks Harlan.

    "Harlan Grove" wrote:

    > "Steved" <[email protected]> wrote...
    > >Hello from Steved
    > >
    > >1.43 to 1343
    > >9.52 to 2152
    > >3.17 to 1517
    > >I have the above in decimal please a formula to 24hour clock as above
    > >
    > >ie 3.17 to become 1517 not 15.17

    >
    > Far & away the shortest and fastest way would be
    >
    > =(x+12)*100
    >
    >
    >


  24. #24
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    (24*60))

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  25. #25
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    ugh, sorry, scratch that suggestion ..
    mis-read your post
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  26. #26
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    This seems to do it ..

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  27. #27
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    If:

    1.43 = 1343 PM

    What would:

    1.43 = ???? AM

    And how do you distinguish one from the other?

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  28. #28
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Hello Max from Steved

    I need 6.30 to be 1830

    Your Formula gives me 0.252083333

    The reason for 1830 is that oracle understands 1830 is 6:30 pm

    Hopefully you can work this out for me and thankyou.

    "Max" wrote:

    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello from Steved
    > >
    > > 1.43 to 1343
    > > 9.52 to 2152
    > > 3.17 to 1517
    > > I have the above in decimal please a formula to 24hour clock as above
    > >
    > > ie 3.17 to become 1517 not 15.17
    > >
    > > Thankyou

    >
    >
    >


  29. #29
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    I've re-posted the revised formula in the other response, re:

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down

    That should do it ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  30. #30
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi Max!

    Not working for me.

    The formula is returning the decimal equivalents and when formatted as TIME
    13:30 displays as TIME AM

    1:43
    9:52
    3:17

    If I add 12 hrs it works!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hello from Steved
    >>
    >> 1.43 to 1343
    >> 9.52 to 2152
    >> 3.17 to 1517
    >> I have the above in decimal please a formula to 24hour clock as above
    >>
    >> ie 3.17 to become 1517 not 15.17
    >>
    >> Thankyou

    >
    >




  31. #31
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    Maybe something like this:

    =(INT(A1)+12&MOD(A1,INT(A1))*100)*1

    Format as GENERAL

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  32. #32
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Steved" <[email protected]> wrote...
    >Hello from Steved
    >
    >1.43 to 1343
    >9.52 to 2152
    >3.17 to 1517
    >I have the above in decimal please a formula to 24hour clock as above
    >
    >ie 3.17 to become 1517 not 15.17


    Far & away the shortest and fastest way would be

    =(x+12)*100



  33. #33
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    2nd revision ..

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  34. #34
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* it all, please.

    See Harlan's offering ..

    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  35. #35
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* all earlier suggestions, please.
    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)

    See Harlan's offering ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  36. #36
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Max" <[email protected]> wrote...
    >Sorry, further testing reveals that the earlier revised formula is still

    not
    >robust enough. Try this 2nd revision below:

    ....
    >=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >/(24*60),"h:mm"))+0.5))

    ....

    You're completely missing the point. You're fixated on returning Excel time
    values when the OP needs either integers or numeric strings that look like
    integers. And he needs them as cell *VALUES*, not what's displayed.

    Even if the OP needed time values, you've still completely missed the point.
    If hours are separated from minutes by a period, all that's needed to
    convert to time in PM is

    =--SUBSTITUTE(x+12,".",":")

    Your approach is so flawed it's breathtaking.



  37. #37
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Harlan Grove" <[email protected]> wrote
    ....
    > Your approach is so flawed it's breathtaking.


    Yes, I know. Thanks, Harlan.
    You probably just missed my post to trash it all ..

    > Even if the OP needed time values, you've still completely missed the

    point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")


    Point noted, thanks !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  38. #38
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    >Your approach is so flawed it's breathtaking.

    Nice one! <vbg>

    Biff

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > "Max" <[email protected]> wrote...
    >>Sorry, further testing reveals that the earlier revised formula is still

    > not
    >>robust enough. Try this 2nd revision below:

    > ...
    >>=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >>(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >>SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >>SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >>/(24*60),"h:mm"))+0.5))

    > ...
    >
    > You're completely missing the point. You're fixated on returning Excel
    > time
    > values when the OP needs either integers or numeric strings that look like
    > integers. And he needs them as cell *VALUES*, not what's displayed.
    >
    > Even if the OP needed time values, you've still completely missed the
    > point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")
    >
    > Your approach is so flawed it's breathtaking.
    >
    >




  39. #39
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Yes, I know, Biff.
    It was my eyes and my mind (both need some repair <g>)
    Pl see responses given in the other branches.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  40. #40
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    ....
    > >Your approach is so flawed it's breathtaking.

    > Nice one! <vbg>

    I'll second that ! <vbg>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  41. #41
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Don't feel bad.

    I once created an uber formula (that did work) and Daniel M. did the same
    thing to me!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > "Biff" <[email protected]> wrote
    > ...
    >> >Your approach is so flawed it's breathtaking.

    >> Nice one! <vbg>

    > I'll second that ! <vbg>
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  42. #42
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    > Don't feel bad.


    Not at all <g>. But of course, I must be accountable for the earlier goofy,
    flawed attempts to help the OP. Harlan was spot on with his suggestion to
    the OP and his descripts/comments on my earlier efforts. All are accepted
    in good spirit.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  43. #43
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    (24*60))

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  44. #44
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi Max!

    Not working for me.

    The formula is returning the decimal equivalents and when formatted as TIME
    13:30 displays as TIME AM

    1:43
    9:52
    3:17

    If I add 12 hrs it works!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hello from Steved
    >>
    >> 1.43 to 1343
    >> 9.52 to 2152
    >> 3.17 to 1517
    >> I have the above in decimal please a formula to 24hour clock as above
    >>
    >> ie 3.17 to become 1517 not 15.17
    >>
    >> Thankyou

    >
    >




  45. #45
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* all earlier suggestions, please.
    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)

    See Harlan's offering ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  46. #46
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* it all, please.

    See Harlan's offering ..

    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  47. #47
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    2nd revision ..

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  48. #48
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Harlan Grove" <[email protected]> wrote
    ....
    > Your approach is so flawed it's breathtaking.


    Yes, I know. Thanks, Harlan.
    You probably just missed my post to trash it all ..

    > Even if the OP needed time values, you've still completely missed the

    point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")


    Point noted, thanks !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  49. #49
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Sorry, further testing reveals that the earlier revised formula is still not
    robust enough. Try this 2nd revision below:

    Assuming the decimals are in A1 down

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello Max from Steved
    >
    > I need 6.30 to be 1830
    >
    > Your Formula gives me 0.252083333
    >
    > The reason for 1830 is that oracle understands 1830 is 6:30 pm
    >
    > Hopefully you can work this out for me and thankyou.




  50. #50
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Steved" <[email protected]> wrote...
    >Hello from Steved
    >
    >1.43 to 1343
    >9.52 to 2152
    >3.17 to 1517
    >I have the above in decimal please a formula to 24hour clock as above
    >
    >ie 3.17 to become 1517 not 15.17


    Far & away the shortest and fastest way would be

    =(x+12)*100



  51. #51
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    >Your approach is so flawed it's breathtaking.

    Nice one! <vbg>

    Biff

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > "Max" <[email protected]> wrote...
    >>Sorry, further testing reveals that the earlier revised formula is still

    > not
    >>robust enough. Try this 2nd revision below:

    > ...
    >>=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >>(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >>SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >>SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >>/(24*60),"h:mm"))+0.5))

    > ...
    >
    > You're completely missing the point. You're fixated on returning Excel
    > time
    > values when the OP needs either integers or numeric strings that look like
    > integers. And he needs them as cell *VALUES*, not what's displayed.
    >
    > Even if the OP needed time values, you've still completely missed the
    > point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")
    >
    > Your approach is so flawed it's breathtaking.
    >
    >




  52. #52
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    Maybe something like this:

    =(INT(A1)+12&MOD(A1,INT(A1))*100)*1

    Format as GENERAL

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  53. #53
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Yes, I know, Biff.
    It was my eyes and my mind (both need some repair <g>)
    Pl see responses given in the other branches.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  54. #54
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Thanks Harlan.

    "Harlan Grove" wrote:

    > "Steved" <[email protected]> wrote...
    > >Hello from Steved
    > >
    > >1.43 to 1343
    > >9.52 to 2152
    > >3.17 to 1517
    > >I have the above in decimal please a formula to 24hour clock as above
    > >
    > >ie 3.17 to become 1517 not 15.17

    >
    > Far & away the shortest and fastest way would be
    >
    > =(x+12)*100
    >
    >
    >


  55. #55
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    I've re-posted the revised formula in the other response, re:

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down

    That should do it ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  56. #56
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    ....
    > >Your approach is so flawed it's breathtaking.

    > Nice one! <vbg>

    I'll second that ! <vbg>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  57. #57
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Hello Max from Steved

    I need 6.30 to be 1830

    Your Formula gives me 0.252083333

    The reason for 1830 is that oracle understands 1830 is 6:30 pm

    Hopefully you can work this out for me and thankyou.

    "Max" wrote:

    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello from Steved
    > >
    > > 1.43 to 1343
    > > 9.52 to 2152
    > > 3.17 to 1517
    > > I have the above in decimal please a formula to 24hour clock as above
    > >
    > > ie 3.17 to become 1517 not 15.17
    > >
    > > Thankyou

    >
    >
    >


  58. #58
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    If:

    1.43 = 1343 PM

    What would:

    1.43 = ???? AM

    And how do you distinguish one from the other?

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  59. #59
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    This seems to do it ..

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  60. #60
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Don't feel bad.

    I once created an uber formula (that did work) and Daniel M. did the same
    thing to me!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > "Biff" <[email protected]> wrote
    > ...
    >> >Your approach is so flawed it's breathtaking.

    >> Nice one! <vbg>

    > I'll second that ! <vbg>
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  61. #61
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    ugh, sorry, scratch that suggestion ..
    mis-read your post
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  62. #62
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Max" <[email protected]> wrote...
    >Sorry, further testing reveals that the earlier revised formula is still

    not
    >robust enough. Try this 2nd revision below:

    ....
    >=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >/(24*60),"h:mm"))+0.5))

    ....

    You're completely missing the point. You're fixated on returning Excel time
    values when the OP needs either integers or numeric strings that look like
    integers. And he needs them as cell *VALUES*, not what's displayed.

    Even if the OP needed time values, you've still completely missed the point.
    If hours are separated from minutes by a period, all that's needed to
    convert to time in PM is

    =--SUBSTITUTE(x+12,".",":")

    Your approach is so flawed it's breathtaking.



  63. #63
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    > Don't feel bad.


    Not at all <g>. But of course, I must be accountable for the earlier goofy,
    flawed attempts to help the OP. Harlan was spot on with his suggestion to
    the OP and his descripts/comments on my earlier efforts. All are accepted
    in good spirit.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  64. #64
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Sorry, further testing reveals that the earlier revised formula is still not
    robust enough. Try this 2nd revision below:

    Assuming the decimals are in A1 down

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello Max from Steved
    >
    > I need 6.30 to be 1830
    >
    > Your Formula gives me 0.252083333
    >
    > The reason for 1830 is that oracle understands 1830 is 6:30 pm
    >
    > Hopefully you can work this out for me and thankyou.




  65. #65
    Steved
    Guest

    Decimal to 24 hour clock please.

    Hello from Steved

    1.43 to 1343
    9.52 to 2152
    3.17 to 1517
    I have the above in decimal please a formula to 24hour clock as above

    ie 3.17 to become 1517 not 15.17

    Thankyou

  66. #66
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    (24*60))

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  67. #67
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    ugh, sorry, scratch that suggestion ..
    mis-read your post
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  68. #68
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    This seems to do it ..

    Assuming the decimals are in A1 down

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  69. #69
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    If:

    1.43 = 1343 PM

    What would:

    1.43 = ???? AM

    And how do you distinguish one from the other?

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  70. #70
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Hello Max from Steved

    I need 6.30 to be 1830

    Your Formula gives me 0.252083333

    The reason for 1830 is that oracle understands 1830 is 6:30 pm

    Hopefully you can work this out for me and thankyou.

    "Max" wrote:

    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello from Steved
    > >
    > > 1.43 to 1343
    > > 9.52 to 2152
    > > 3.17 to 1517
    > > I have the above in decimal please a formula to 24hour clock as above
    > >
    > > ie 3.17 to become 1517 not 15.17
    > >
    > > Thankyou

    >
    >
    >


  71. #71
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    I've re-posted the revised formula in the other response, re:

    Put in B1:

    =IF(OR(A1={0,24}),0,(LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)
    /(24*60))+0.5)

    Format B1 as Time, Type:"13:30", and copy down

    That should do it ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  72. #72
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi Max!

    Not working for me.

    The formula is returning the decimal equivalents and when formatted as TIME
    13:30 displays as TIME AM

    1:43
    9:52
    3:17

    If I add 12 hrs it works!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Assuming the decimals are in A1 down
    >
    > Put in B1:
    >
    > =IF(OR(A1={0,24}),0,LEFT(A1,SEARCH(".",A1)-1)/24+MID(A1,SEARCH(".",A1)+1,2)/
    > (24*60))
    >
    > Format B1 as Time, Type:"13:30", and copy down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Steved" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hello from Steved
    >>
    >> 1.43 to 1343
    >> 9.52 to 2152
    >> 3.17 to 1517
    >> I have the above in decimal please a formula to 24hour clock as above
    >>
    >> ie 3.17 to become 1517 not 15.17
    >>
    >> Thankyou

    >
    >




  73. #73
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Hi!

    Maybe something like this:

    =(INT(A1)+12&MOD(A1,INT(A1))*100)*1

    Format as GENERAL

    Biff

    "Steved" <[email protected]> wrote in message
    news:[email protected]...
    > Hello from Steved
    >
    > 1.43 to 1343
    > 9.52 to 2152
    > 3.17 to 1517
    > I have the above in decimal please a formula to 24hour clock as above
    >
    > ie 3.17 to become 1517 not 15.17
    >
    > Thankyou




  74. #74
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Steved" <[email protected]> wrote...
    >Hello from Steved
    >
    >1.43 to 1343
    >9.52 to 2152
    >3.17 to 1517
    >I have the above in decimal please a formula to 24hour clock as above
    >
    >ie 3.17 to become 1517 not 15.17


    Far & away the shortest and fastest way would be

    =(x+12)*100



  75. #75
    Steved
    Guest

    Re: Decimal to 24 hour clock please.

    Thanks Harlan.

    "Harlan Grove" wrote:

    > "Steved" <[email protected]> wrote...
    > >Hello from Steved
    > >
    > >1.43 to 1343
    > >9.52 to 2152
    > >3.17 to 1517
    > >I have the above in decimal please a formula to 24hour clock as above
    > >
    > >ie 3.17 to become 1517 not 15.17

    >
    > Far & away the shortest and fastest way would be
    >
    > =(x+12)*100
    >
    >
    >


  76. #76
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    2nd revision ..

    Put instead in B1:

    =IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,(TEXT(LEFT(A1,SEARC
    H(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"
    ))+0.5,(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)
    +1,2)/(24*60),"h:mm"))+0.5))

    Format B1 as Time, Type:"13:30", and copy down

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  77. #77
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* it all, please.

    See Harlan's offering ..

    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  78. #78
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    urgh .. trash* all earlier suggestions, please.
    (*Think my eyes are no longer able to distinguish reliably whether ":"
    exists onscreen/print or not <bg>)

    See Harlan's offering ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  79. #79
    Harlan Grove
    Guest

    Re: Decimal to 24 hour clock please.

    "Max" <[email protected]> wrote...
    >Sorry, further testing reveals that the earlier revised formula is still

    not
    >robust enough. Try this 2nd revision below:

    ....
    >=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >/(24*60),"h:mm"))+0.5))

    ....

    You're completely missing the point. You're fixated on returning Excel time
    values when the OP needs either integers or numeric strings that look like
    integers. And he needs them as cell *VALUES*, not what's displayed.

    Even if the OP needed time values, you've still completely missed the point.
    If hours are separated from minutes by a period, all that's needed to
    convert to time in PM is

    =--SUBSTITUTE(x+12,".",":")

    Your approach is so flawed it's breathtaking.



  80. #80
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Harlan Grove" <[email protected]> wrote
    ....
    > Your approach is so flawed it's breathtaking.


    Yes, I know. Thanks, Harlan.
    You probably just missed my post to trash it all ..

    > Even if the OP needed time values, you've still completely missed the

    point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")


    Point noted, thanks !
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  81. #81
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    >Your approach is so flawed it's breathtaking.

    Nice one! <vbg>

    Biff

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > "Max" <[email protected]> wrote...
    >>Sorry, further testing reveals that the earlier revised formula is still

    > not
    >>robust enough. Try this 2nd revision below:

    > ...
    >>=IF(OR(A1={0,24}),0,IF(LEN(MID(A1,SEARCH(".",A1)+1,2))=1,
    >>(TEXT(LEFT(A1,SEARCH(".",A1)-1)/24,"h:mm")+TEXT((MID(A1,
    >>SEARCH(".",A1)+1,2)&"0")/(24*60),"h:mm"))+0.5,(TEXT(LEFT(A1,
    >>SEARCH(".",A1)-1)/24,"h:mm")+TEXT(MID(A1,SEARCH(".",A1)+1,2)
    >>/(24*60),"h:mm"))+0.5))

    > ...
    >
    > You're completely missing the point. You're fixated on returning Excel
    > time
    > values when the OP needs either integers or numeric strings that look like
    > integers. And he needs them as cell *VALUES*, not what's displayed.
    >
    > Even if the OP needed time values, you've still completely missed the
    > point.
    > If hours are separated from minutes by a period, all that's needed to
    > convert to time in PM is
    >
    > =--SUBSTITUTE(x+12,".",":")
    >
    > Your approach is so flawed it's breathtaking.
    >
    >




  82. #82
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    Yes, I know, Biff.
    It was my eyes and my mind (both need some repair <g>)
    Pl see responses given in the other branches.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  83. #83
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    ....
    > >Your approach is so flawed it's breathtaking.

    > Nice one! <vbg>

    I'll second that ! <vbg>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  84. #84
    Biff
    Guest

    Re: Decimal to 24 hour clock please.

    Don't feel bad.

    I once created an uber formula (that did work) and Daniel M. did the same
    thing to me!

    Biff

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > "Biff" <[email protected]> wrote
    > ...
    >> >Your approach is so flawed it's breathtaking.

    >> Nice one! <vbg>

    > I'll second that ! <vbg>
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  85. #85
    Max
    Guest

    Re: Decimal to 24 hour clock please.

    "Biff" <[email protected]> wrote
    > Don't feel bad.


    Not at all <g>. But of course, I must be accountable for the earlier goofy,
    flawed attempts to help the OP. Harlan was spot on with his suggestion to
    the OP and his descripts/comments on my earlier efforts. All are accepted
    in good spirit.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1