ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extract time from date (https://www.excelbanter.com/excel-programming/432877-extract-time-date.html)

K[_2_]

Extract time from date
 
Hi all, I have formated cell A1 in "dd\mm\yyyy hh:mm" and value
appearing is "26/08/2009 10:00". I need some formula in cell B1 to
extract just the time bit from cell A1 value. I know I can copy cell
A1 value into cell B1 and change the format into "hh:mm" and i'll get
what i want but i dont want to do it that way. I need some thing like
"RIGHT(A1,5)". I tried this but its not working. Please can any
friend can help.

Rick Rothstein

Extract time from date
 
Use this...

=MOD(A1,1)

and format the cell as Time.

--
Rick (MVP - Excel)


"K" wrote in message
...
Hi all, I have formated cell A1 in "dd\mm\yyyy hh:mm" and value
appearing is "26/08/2009 10:00". I need some formula in cell B1 to
extract just the time bit from cell A1 value. I know I can copy cell
A1 value into cell B1 and change the format into "hh:mm" and i'll get
what i want but i dont want to do it that way. I need some thing like
"RIGHT(A1,5)". I tried this but its not working. Please can any
friend can help.



Eduardo

Extract time from date
 
Hi,
=text(a1,"hh:mm")

if this helps please click yes thanks

"K" wrote:

Hi all, I have formated cell A1 in "dd\mm\yyyy hh:mm" and value
appearing is "26/08/2009 10:00". I need some formula in cell B1 to
extract just the time bit from cell A1 value. I know I can copy cell
A1 value into cell B1 and change the format into "hh:mm" and i'll get
what i want but i dont want to do it that way. I need some thing like
"RIGHT(A1,5)". I tried this but its not working. Please can any
friend can help.


Rick Rothstein

Extract time from date
 
Just so the OP knows, your formula as written, returns text, not a number.
If the OP needs a number, then he should use this...

=--TEXT(A1,"hh:mm")

--
Rick (MVP - Excel)


"Eduardo" wrote in message
...
Hi,
=text(a1,"hh:mm")

if this helps please click yes thanks

"K" wrote:

Hi all, I have formated cell A1 in "dd\mm\yyyy hh:mm" and value
appearing is "26/08/2009 10:00". I need some formula in cell B1 to
extract just the time bit from cell A1 value. I know I can copy cell
A1 value into cell B1 and change the format into "hh:mm" and i'll get
what i want but i dont want to do it that way. I need some thing like
"RIGHT(A1,5)". I tried this but its not working. Please can any
friend can help.



K[_2_]

Extract time from date
 
thanks Eduardo


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com