ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Determining AM or PM in text string (https://www.excelbanter.com/excel-worksheet-functions/116196-determining-am-pm-text-string.html)

Bob

Determining AM or PM in text string
 
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.

Carim

Determining AM or PM in text string
 
Hi Bob,

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

HTH
Carim


smw226 via OfficeKB.com

Determining AM or PM in text string
 
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)

Bob wrote:
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.a...tions/200610/1


David Biddulph

Determining AM or PM in text string
 
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&MOD(HOUR(NOW()),12)&":"&MINUTE(NOW())&IF(HOUR(NO W())12," PM"," AM")
--
David Biddulph

"Bob" wrote in message
...
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.




Bob

Determining AM or PM in text string
 
Carim - Thanks!
Bob

"Carim" wrote:

Hi Bob,

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

HTH
Carim



Bob

Determining AM or PM in text string
 
Thanks!
Bob


"smw226 via OfficeKB.com" wrote:

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)

Bob wrote:
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.a...tions/200610/1



Lori

Determining AM or PM in text string
 
Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")


Bob

Determining AM or PM in text string
 
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


"Lori" wrote:

Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")



Lori

Determining AM or PM in text string
 
Happy to assist, it's the same as entering =NOW() and formatting the
number as in the formula.

Bob wrote:

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


"Lori" wrote:

Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")





All times are GMT +1. The time now is 11:42 AM.

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