Can someone explian why I get a return of not a valid date when using
activeX vbscript for DTS:
Select (Date())
Case (IsDate(Date())
msgbox "OK"
Case Else
msbox "I cant figure this out"
End Select
msbox "I cant figure this out" pops rather than msgbox "OK"Your Select Case statement is malformed. Try:
Select Case IsDate(Date())
Case True
MsgBox "OK"
Case Else
MsgBox "I cant figure this out"
End Select
Hope this helps.
Dan Guzman
SQL Server MVP
<lebeau777@.hotmail.com> wrote in message
news:1143836184.567616.6570@.z34g2000cwc.googlegroups.com...
> Can someone explian why I get a return of not a valid date when using
> activeX vbscript for DTS:
> Select (Date())
> Case (IsDate(Date())
> msgbox "OK"
> Case Else
> msbox "I cant figure this out"
> End Select
> msbox "I cant figure this out" pops rather than msgbox "OK"
>|||Please ignore my previous response (copy/paste error). The script should
be:
Select Case IsDate(Date())
Case True
msgbox "OK"
Case Else
msgbox "I cant figure this out"
End Select
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:u45IViZVGHA.3716@.TK2MSFTNGP15.phx.gbl...
> Your Select Case statement is malformed. Try:
> Select Case IsDate(Date())
> Case True
> MsgBox "OK"
> Case Else
> MsgBox "I cant figure this out"
> End Select
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> <lebeau777@.hotmail.com> wrote in message
> news:1143836184.567616.6570@.z34g2000cwc.googlegroups.com...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment