Is there a way to test weather the time is AM or PM with a logical .T./.F.
return?

Respectfully,

Jonathan Morningstar

Re: AM/PM Logical ? by Rush

Rush
Tue Apr 22 12:40:19 CDT 2008

Jonathan Morningstar wrote:
> Is there a way to test weather the time is AM or PM with a logical
> .T./.F. return?
>
> Respectfully,
>
> Jonathan Morningstar
If you want to test the weather, just stick your hand out the window -
this works morning or night. [Sorry.]

Since 12 noon is defined as 12 PM;

lIsAM = HOUR(Time|DateTime) < 12

should do it. HOUR() returns a 24 hour value, regardless of your local
display settings.

- Rush

Re: AM/PM Logical ? by Stefan

Stefan
Tue Apr 22 12:51:36 CDT 2008


"Jonathan Morningstar" <jm@ablecon.com> wrote in message
news:FA50D8AC-481F-4554-B1EF-54C5B93F1818@microsoft.com...
> Is there a way to test weather the time is AM or PM with a logical .T./.F. return?

Hour() is independent of Set Hour, Set Date etc., so

am = ( HOUR(dateTimeValue) < 12 )



hth
-Stefan



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: AM/PM Logical ? by Jonathan

Jonathan
Tue Apr 22 14:19:31 CDT 2008

Thank you. That helps a ton.

Jonathan M*
"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:OdGIgGKpIHA.552@TK2MSFTNGP06.phx.gbl...
>
> "Jonathan Morningstar" <jm@ablecon.com> wrote in message
> news:FA50D8AC-481F-4554-B1EF-54C5B93F1818@microsoft.com...
>> Is there a way to test weather the time is AM or PM with a logical
>> .T./.F. return?
>
> Hour() is independent of Set Hour, Set Date etc., so
>
> am = ( HOUR(dateTimeValue) < 12 )
>
>
>
> hth
> -Stefan
>
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------