Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

Determining AM or PM in text string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 26 Oct 2006 12:42 GMT
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 - 26 Oct 2006 12:55 GMT
Hi Bob,

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

HTH
Carim
Bob - 26 Oct 2006 13:10 GMT
Carim - Thanks!
Bob

> Hi Bob,
>
[quoted text clipped - 3 lines]
> HTH
> Carim
smw226 - 26 Oct 2006 12:56 GMT
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.

Signature

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

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

Bob - 26 Oct 2006 13:10 GMT
Thanks!
Bob

> Hi Bob,
>
[quoted text clipped - 13 lines]
> >Can someone help me modify my formula to include it?
> >Thanks for the help.
David Biddulph - 26 Oct 2006 13:02 GMT
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&MOD(HOUR(NOW()),12)&":"&MINUTE(NOW())&IF(HOUR(NOW())>12," PM"," AM")
Signature

David Biddulph

>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.
Lori - 26 Oct 2006 13:29 GMT
Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")
Bob - 27 Oct 2006 04:40 GMT
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

> Alternatively, try:
>
> =TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")
Lori - 27 Oct 2006 12:55 GMT
Happy to assist, it's the same as entering =NOW() and formatting the
number as in the formula.

> Lori,
> Thanks!!!  I like your solution the best because the formula is short (and
[quoted text clipped - 5 lines]
> >
> > =TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.