|
 |
asp_databases thread: RE: Convert to Date Type
Message #1 by Martin Lee <access@o...> on Thu, 16 May 2002 20:11:39 +0800
|
|
Thanks for the replies, just what was needed.
Martin
At 04:12 PM 5/15/2002 -0400, you wrote:
>Maybe something like this...
>
><%
>intMonth=5
>intYear=2002
>
>Dim myDate
>
>if intMonth < 10 Then myDate = "0"
>myDate = myDate & intMonth & "/01/" & intYear
>
>%>
>
> > -----Original Message-----
> > From: Martin Lee [mailto:access@o...]
> > Sent: Wednesday, May 15, 2002 9:24 AM
> > To: ASP Databases
> > Subject: [asp_databases] Convert to Date Type
> >
> >
> > Hi All:
> >
> > am passing 2 variables via the querystring (intMonth) and (intYear)
> >
> > How can I convert these 2 variables into a date to be passed
> > onto a sp?
> >
> > Say intMonth=5 and intYear=2002; need to convert them to: 05/01/2002
> >
> > Thanks,
> >
> > Martin
> >
> >
> >
>
Message #2 by "Drew, Ron" <RDrew@B...> on Wed, 15 May 2002 16:22:28 -0400
|
|
If len(intMonth) < 2 then
newStr =3D "0" + intMonth + "/01" + intYear
else
newStr =3D intMonth + '/01' + intYear
End if
-----Original Message-----
From: Martin Lee [mailto:access@o...]
Sent: Wednesday, May 15, 2002 9:24 AM
To: ASP Databases
Subject: [asp_databases] Convert to Date Type
Hi All:
am passing 2 variables via the querystring (intMonth) and (intYear)
How can I convert these 2 variables into a date to be passed onto a sp?
Say intMonth=3D5 and intYear=3D2002; need to convert them to: 05/01/2002
Thanks,
Martin
Message #3 by "Peter Foti (PeterF)" <PeterF@S...> on Wed, 15 May 2002 16:12:26 -0400
|
|
Maybe something like this...
<%
intMonth=5
intYear=2002
Dim myDate
if intMonth < 10 Then myDate = "0"
myDate = myDate & intMonth & "/01/" & intYear
%>
> -----Original Message-----
> From: Martin Lee [mailto:access@o...]
> Sent: Wednesday, May 15, 2002 9:24 AM
> To: ASP Databases
> Subject: [asp_databases] Convert to Date Type
>
>
> Hi All:
>
> am passing 2 variables via the querystring (intMonth) and (intYear)
>
> How can I convert these 2 variables into a date to be passed
> onto a sp?
>
> Say intMonth=5 and intYear=2002; need to convert them to: 05/01/2002
>
> Thanks,
>
> Martin
>
>
>
Message #4 by Martin Lee <access@o...> on Wed, 15 May 2002 21:24:00 +0800
|
|
Hi All:
am passing 2 variables via the querystring (intMonth) and (intYear)
How can I convert these 2 variables into a date to be passed onto a sp?
Say intMonth=5 and intYear=2002; need to convert them to: 05/01/2002
Thanks,
Martin
|
|
 |