View Single Post
 
Old May 15th, 2006, 05:08 AM
rupen rupen is offline
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Date conversion from querystring.

Hi All,

I have to get date value from query string.
I use below code:
-----------------------
dim dtFrom
if Request.querystring("dtFrom") = "" then
    dtFrom = CDate(date()-1)
else
    dtFrom = Request.querystring("dtFrom")
end if

----------- error at this line:
wday = DateDiff("d",Cdate(Cstr(dtFrom)),Cdate(Cstr(dtTo)) )

----------------------
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CDate'

Thanks in advance.


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.