![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Include AM or PM using DatePart Function 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? Thanks for the help. Len |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Include AM or PM using DatePart Function "Len" <Len@xxxxxx> wrote in message news F5AE6E6-CB72-451F-A6BF-EE57A8C0B34B@xxxxxxQuote: >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? example above, it should return '4' for 4 AM and '16' for 4 PM. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Script that uses the DatePart & Case select | VB Script | |||
| How to reverse DatePart("y",Date) ? | VB Script | |||
| Week number with DatePart syntax, and Server... | VB Script | |||
| BUG: Redirecting function contents to a file truncates function lines at the width of the console | PowerShell | |||
| Tab Completion customization to include function search? | PowerShell | |||