"Military Time" = 2400 hour clock. 00:01 = 12:01 AM (1 past midnight),
08:00 = 8:00 AM, 16:00 = 4 PM, 2359 = 11:59 PM. Can't test it myself right
now, but the DateTime object conversion might automatically account for
military time. Have you tried a DateTime conversion yet on your Military
Time string? If you can Convert to a DateTime, you should have access to
all DateTime functionality.
Thanks
"Alexandre Moura" <amoura@online.microsoft.com> wrote in message
news:tt2yuKQIFHA.1136@TK2MSFTNGXA02.phx.gbl...[color=blue]
> Not sure if I understand what you mean by military time, but if it's just
> the hour attached to the minutes, then I might have a solution - cast the
> time to an
> integer, and build a similarly formated date with:
> if cint("730") > d.hour *100 + d.minute...
>
> as for the rest, the date object has a dayofweek property you can use
> if Now.DayOfWeek >= DayOfWeek.Monday And Now.DayOfWeek <= DayOfWeek.Friday
> then...
>
> Mind you, this enum is sequential, but Sunday is the starting day (so it's
> value is 0)
>
> Alex
>
> --------------------[color=green]
>>From: "richardkreidl@northwesternmutual.com"
>><richardkreidl@northwesternmutual.com>
>>Newsgroups: microsoft.public.dotnet.languages.vb
>>Subject: Comparing Military time and day of week
>>Date: 4 Mar 2005 12:42:50 -0800
>>Organization:
http://groups.google.com
>>Lines: 15
>>Message-ID: <1109968970.669832.176050@g14g2000cwa.googlegroups .com>
>>NNTP-Posting-Host: 67.53.9.180
>>Mime-Version: 1.0
>>Content-Type: text/plain; charset="iso-8859-1"
>>X-Trace: posting.google.com 1109968976 24783 127.0.0.1 (4 Mar 2005
>>20:42:56 GMT)
>>X-Complaints-To:
groups-abuse@google.com
>>NNTP-Posting-Date: Fri, 4 Mar 2005 20:42:56 +0000 (UTC)
>>User-Agent: G2/0.2
>>Complaints-To:
groups-abuse@google.com
>>Injection-Info: g14g2000cwa.googlegroups.com; posting-host=67.53.9.180;
>> posting-account=Ma6C7AwAAABwf3jndM8pyK2kS3uYbxvD
>>Path:
>>TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MS FTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new sfeed1.ip.tiscali.net!news.glorb.com![/color]
> postnews.google.com!g14g2000cwa.googlegroups.com!n ot-for-mail[color=green]
>>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:263343
>>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>>
>>How would I check to see if the current time(military format) is
>>greater then 07:30AM and the day of the week is Monday-Friday.
>>
>>Pseudo code:
>>
>>If Current_Time > 07:30AM and Current_Day = Monday or Current_Day =
>>Tuesday _
>>or Current_Day = Wednesday or Current_Day = Thursday or Current_Day =
>>Friday
>>then
>> Do this
>>else
>> Do something else
>>end if
>>
>>[/color]
>
>[/color]