"Len" <Len@xxxxxx> wrote in message
news

F5AE6E6-CB72-451F-A6BF-EE57A8C0B34B@xxxxxx
>I do not know how to extract the AM or PM in the DatePart Function
>
> My Code is:
>
> <%
> tmCurrentTime = Now()
> tmCurrentTime = DatePart("h",tmCurrentTime) & ":" &
> DatePart("n",tmCurrentTime)
> %>
>
> This works, but I do not know how to get the AM or PM.
>
> If DatePart("h",tmCurrentTime) is 4, how do I know if it is AM or PM? It should return the hour of the day starting from midnight. In your
example above, it should return '4' for 4 AM and '16' for 4 PM.