Determining AM or PM in text string

B

Bob

I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.
 
C

Carim

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&HOUR(NOW())&":"&MINUTE(NOW())&" "&IF(HOUR(NOW())>12,"PM","AM")

HTH
Carim
 
S

smw226 via OfficeKB.com

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())&IF
(HOUR(NOW())<=11," am"," pm")

HTH

Simon

(This will work when the clock is set to 24h, but I have not testest it on
the 12h setting)
I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.

--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-functions/200610/1
 
D

David Biddulph

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&MOD(HOUR(NOW()),12)&":"&MINUTE(NOW())&IF(HOUR(NOW())>12," PM"," AM")
 
B

Bob

Thanks!
Bob


smw226 via OfficeKB.com said:
Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())&IF
(HOUR(NOW())<=11," am"," pm")

HTH

Simon

(This will work when the clock is set to 24h, but I have not testest it on
the 12h setting)
I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.

--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-functions/200610/1
 
B

Bob

Lori,
Thanks!!! I like your solution the best because the formula is short (and
efficient), and it doesn't display the time in military format.
Thanks again,
Bob
 
L

Lori

Happy to assist, it's the same as entering =NOW() and formatting the
number as in the formula.
 
Top