Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Compare Dates problem


Message #1 by "Nigel" <nigel@m...> on Fri, 24 May 2002 11:30:41 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_0002_01C20316.6F398680
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi could anyone help me compare 2 dates ...

My databse is using UK format eg: 24/05/2002

I am running an Access Databse and I keep getting this error

Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID='9' AND WHERE
Deadline => 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is
strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND WHERE
Deadline => " & CheckDate & ""

And checkdate had a value of 24/05/2002
Do i need to convert my CheckDate Variable into a date and if so how ..

I Hope you understand what im asking as im not sure im clear enough ...

Thanks in advance :)

Nigel






Message #2 by "Willems Serge" <Serge.Willems@c...> on Fri, 24 May 2002 12:49:09 +0200
This is a multi-part message in MIME format.

------_=_NextPart_001_01C20310.A22A322F
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Try leaving the second "WHERE"
or maybe you should try to convert the date into another format (eg: 
05/24/2002)

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: vrijdag, mei 24, 2002 12:31
To: ASP Web HowTo
Subject: [asp_web_howto] Compare Dates problem


Hi could anyone help me compare 2 dates ...

My databse is using UK format eg: 24/05/2002

I am running an Access Databse and I keep getting this error

Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID=3D'9' AND 
WHERE Deadline =3D> 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is
strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
WHERE Deadline =3D> " & CheckDate & ""

And checkdate had a value of 24/05/2002
Do i need to convert my CheckDate Variable into a date and if so how ..

I Hope you understand what im asking as im not sure im clear enough ...

Thanks in advance :)

Nigel




--- Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---


Message #3 by "Nigel" <nigel@m...> on Fri, 24 May 2002 12:01:45 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C2031A.C6BAD040
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

yeah i realised i should have removed the second  "WHERE" ... I have done
that and still probs..

I have converted the date back to 5/25/2002

Still get the error
'ParentID=9 AND Deadline => 5/24/2002'.
(0x80040E14)




  -----Original Message-----
  From: Willems Serge [mailto:Serge.Willems@c...]
  Sent: 24 May 2002 11:49
  To: ASP Web HowTo
  Subject: [asp_web_howto] RE: Compare Dates problem


  Try leaving the second "WHERE"
  or maybe you should try to convert the date into another format (eg:
05/24/2002)
    -----Original Message-----
    From: Nigel [mailto:nigel@m...]
    Sent: vrijdag, mei 24, 2002 12:31
    To: ASP Web HowTo
    Subject: [asp_web_howto] Compare Dates problem


    Hi could anyone help me compare 2 dates ...

    My databse is using UK format eg: 24/05/2002

    I am running an Access Databse and I keep getting this error

    Microsoft JET Database Engine (0x80040E14)
    Syntax error (missing operator) in query expression 'ParentID='9' AND
WHERE Deadline => 24/05/2002'.
    /mintweb/Minternal/client/furthedetails.asp, line 17

    Line 17 is
    strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND WHERE
Deadline => " & CheckDate & ""

    And checkdate had a value of 24/05/2002
    Do i need to convert my CheckDate Variable into a date and if so how ..

    I Hope you understand what im asking as im not sure im clear enough ...

    Thanks in advance :)

    Nigel




    --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
  --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---


Message #4 by "Willems Serge" <Serge.Willems@c...> on Fri, 24 May 2002 13:10:08 +0200
This is a multi-part message in MIME format.

------_=_NextPart_001_01C20313.9064812F
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Final try, else I don't have the answer... Sorry
    isn't it: >=3D in stead of =3D>
try converting the date-string to date format
I think it's the function CDate(date-string)

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: vrijdag, mei 24, 2002 13:02
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


yeah i realised i should have removed the second  "WHERE" ... I have 
done that and still probs..

I have converted the date back to 5/25/2002

Still get the error
'ParentID=3D9 AND Deadline =3D> 5/24/2002'.
(0x80040E14)





-----Original Message-----
From: Willems Serge [mailto:Serge.Willems@c...]
Sent: 24 May 2002 11:49
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


Try leaving the second "WHERE"
or maybe you should try to convert the date into another format (eg: 
05/24/2002)

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: vrijdag, mei 24, 2002 12:31
To: ASP Web HowTo
Subject: [asp_web_howto] Compare Dates problem


Hi could anyone help me compare 2 dates ...

My databse is using UK format eg: 24/05/2002

I am running an Access Databse and I keep getting this error

Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID=3D'9' AND 
WHERE Deadline =3D> 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is
strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
WHERE Deadline =3D> " & CheckDate & ""

And checkdate had a value of 24/05/2002
Do i need to convert my CheckDate Variable into a date and if so how ..

I Hope you understand what im asking as im not sure im clear enough ...

Thanks in advance :)

Nigel




--- Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---

--- Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---

--- Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---


Message #5 by "Debreceni, David" <david_debreceni@r...> on Fri, 24 May 2002 07:24:10 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C20315.86C1CE80
Content-Type: text/plain;
	charset="iso-8859-1"

It looks like you are missing a single quote after the deadline expression.
strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND  Deadline
>= '" & CheckDate & ""
 

David Debreceni 
Senior Visual Basic/ASP Developer 
xxx-xxx-xxxx  x 1086 

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: Friday, May 24, 2002 6:31 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Compare Dates problem


Hi could anyone help me compare 2 dates ... 
 
My databse is using UK format eg: 24/05/2002
 
I am running an Access Databse and I keep getting this error 
 
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID='9' AND WHERE
Deadline => 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is 
strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND WHERE
Deadline => " & CheckDate & ""
 
And checkdate had a value of 24/05/2002 
Do i need to convert my CheckDate Variable into a date and if so how .. 
 
I Hope you understand what im asking as im not sure im clear enough ... 
 
Thanks in advance :) 
 
Nigel
 
 
 
 
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 --- 


Message #6 by "Debreceni, David" <david_debreceni@r...> on Fri, 24 May 2002 07:27:46 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C20316.0742D720
Content-Type: text/plain;
	charset="iso-8859-1"

Sorry I forgot the other quote around the date
strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND  Deadline
>= '" & CheckDate & "'"
 

David Debreceni 
Senior Visual Basic/ASP Developer 
xxx-xxx-xxxx  x 1086 

-----Original Message-----
From: Debreceni, David 
Sent: Friday, May 24, 2002 7:24 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


It looks like you are missing a single quote after the deadline expression.

strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND  Deadline
>= '" & CheckDate & ""
 

David Debreceni 
Senior Visual Basic/ASP Developer 
xxx-xxx-xxxx  x 1086 

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: Friday, May 24, 2002 6:31 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Compare Dates problem


Hi could anyone help me compare 2 dates ... 
 
My databse is using UK format eg: 24/05/2002
 
I am running an Access Databse and I keep getting this error 
 
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID='9' AND WHERE
Deadline => 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is 
strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND WHERE
Deadline => " & CheckDate & ""
 
And checkdate had a value of 24/05/2002 
Do i need to convert my CheckDate Variable into a date and if so how .. 
 
I Hope you understand what im asking as im not sure im clear enough ... 
 
Thanks in advance :) 
 
Nigel
 
 
 
 
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 --- 

--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 --- 


Message #7 by "Nigel" <nigel@m...> on Fri, 24 May 2002 12:30:38 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C2031E.CFB011C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Thanks but still no joy ...

If I  " IsDate(CheckDate)"  I get true ..

But If i " CDate(CheckDate)"  I get Type Mismatch ????

ARRRGGGHHH!!! (lol)

Anyway thanx :)

Nigel
  -----Original Message-----
  From: Willems Serge [mailto:Serge.Willems@c...]
  Sent: 24 May 2002 12:10
  To: ASP Web HowTo
  Subject: [asp_web_howto] RE: Compare Dates problem


  Final try, else I don't have the answer... Sorry
      isn't it: >= in stead of =>
  try converting the date-string to date format
  I think it's the function CDate(date-string)
    -----Original Message-----
    From: Nigel [mailto:nigel@m...]
    Sent: vrijdag, mei 24, 2002 13:02
    To: ASP Web HowTo
    Subject: [asp_web_howto] RE: Compare Dates problem


    yeah i realised i should have removed the second  "WHERE" ... I have
done that and still probs..

    I have converted the date back to 5/25/2002

    Still get the error
    'ParentID=9 AND Deadline => 5/24/2002'.
    (0x80040E14)




      -----Original Message-----
      From: Willems Serge [mailto:Serge.Willems@c...]
      Sent: 24 May 2002 11:49
      To: ASP Web HowTo
      Subject: [asp_web_howto] RE: Compare Dates problem


      Try leaving the second "WHERE"
      or maybe you should try to convert the date into another format (eg:
05/24/2002)
        -----Original Message-----
        From: Nigel [mailto:nigel@m...]
        Sent: vrijdag, mei 24, 2002 12:31
        To: ASP Web HowTo
        Subject: [asp_web_howto] Compare Dates problem


        Hi could anyone help me compare 2 dates ...

        My databse is using UK format eg: 24/05/2002

        I am running an Access Databse and I keep getting this error

        Microsoft JET Database Engine (0x80040E14)
        Syntax error (missing operator) in query expression 'ParentID='9'
AND WHERE Deadline => 24/05/2002'.
        /mintweb/Minternal/client/furthedetails.asp, line 17

        Line 17 is
        strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND
WHERE Deadline => " & CheckDate & ""

        And checkdate had a value of 24/05/2002
        Do i need to convert my CheckDate Variable into a date and if so how
..

        I Hope you understand what im asking as im not sure im clear enough
...

        Thanks in advance :)

        Nigel




        --- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
      --- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
    --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
  --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---


Message #8 by "Nigel" <nigel@m...> on Fri, 24 May 2002 12:35:04 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C2031F.6E460FB0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Thanx ...

and im getting a new error at least ( Waheyy !! )

Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/mintweb/Minternal/client/furthedetails.asp, line 10


Line 10 is

rsDetailMI.Open  strSQL, objConn

Any help please :)


  -----Original Message-----
  From: Debreceni, David [mailto:david_debreceni@r...]
  Sent: 24 May 2002 12:24
  To: ASP Web HowTo
  Subject: [asp_web_howto] RE: Compare Dates problem


  It looks like you are missing a single quote after the deadline
expression.
  strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND  Deadline
>= '" & CheckDate & ""

  David Debreceni
  Senior Visual Basic/ASP Developer
  xxx-xxx-xxxx  x 1086

    -----Original Message-----
    From: Nigel [mailto:nigel@m...]
    Sent: Friday, May 24, 2002 6:31 AM
    To: ASP Web HowTo
    Subject: [asp_web_howto] Compare Dates problem


    Hi could anyone help me compare 2 dates ...

    My databse is using UK format eg: 24/05/2002

    I am running an Access Databse and I keep getting this error

    Microsoft JET Database Engine (0x80040E14)
    Syntax error (missing operator) in query expression 'ParentID='9' AND
WHERE Deadline => 24/05/2002'.
    /mintweb/Minternal/client/furthedetails.asp, line 17

    Line 17 is
    strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND WHERE
Deadline => " & CheckDate & ""

    And checkdate had a value of 24/05/2002
    Do i need to convert my CheckDate Variable into a date and if so how ..

    I Hope you understand what im asking as im not sure im clear enough ...

    Thanks in advance :)

    Nigel




    --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
  --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---


Message #9 by "Serge Wagemakers" <swagemakers@d...> on Fri, 24 May 2002 13:38:28 +0200
This is a multi-part message in MIME format.

------=_NextPart_000_0110_01C20328.49C222B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Nigel,

Try this:

strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
Deadline >=3D #" & CheckDate & "#"

HTH,

Serge
  ----- Original Message -----
  From: Nigel
  To: ASP Web HowTo
  Sent: Friday, May 24, 2002 1:01 PM
  Subject: [asp_web_howto] RE: Compare Dates problem


  yeah i realised i should have removed the second  "WHERE" ... I have 
done that and still probs..

  I have converted the date back to 5/25/2002

  Still get the error
  'ParentID=3D9 AND Deadline =3D> 5/24/2002'.
  (0x80040E14)




    -----Original Message-----
    From: Willems Serge [mailto:Serge.Willems@c...]
    Sent: 24 May 2002 11:49
    To: ASP Web HowTo
    Subject: [asp_web_howto] RE: Compare Dates problem


    Try leaving the second "WHERE"
    or maybe you should try to convert the date into another format (eg: 
05/24/2002)
      -----Original Message-----
      From: Nigel [mailto:nigel@m...]
      Sent: vrijdag, mei 24, 2002 12:31
      To: ASP Web HowTo
      Subject: [asp_web_howto] Compare Dates problem


      Hi could anyone help me compare 2 dates ...

      My databse is using UK format eg: 24/05/2002

      I am running an Access Databse and I keep getting this error

      Microsoft JET Database Engine (0x80040E14)
      Syntax error (missing operator) in query expression 
'ParentID=3D'9' AND WHERE Deadline =3D> 24/05/2002'.
      /mintweb/Minternal/client/furthedetails.asp, line 17

      Line 17 is
      strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' 
AND WHERE Deadline =3D> " & CheckDate & ""

      And checkdate had a value of 24/05/2002
      Do i need to convert my CheckDate Variable into a date and if so 
how ..

      I Hope you understand what im asking as im not sure im clear 
enough ...

      Thanks in advance :)

      Nigel




      --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
    --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
  --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---


Message #10 by "Nigel" <nigel@m...> on Fri, 24 May 2002 12:57:23 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_0028_01C20322.8C5A1340
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Sorry still no joy ...

I get
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/mintweb/Minternal/client/furthedetails.asp, line 18

strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND Deadline >
#" & CheckDate & "#"
>>  rsDetailMD.Open  strSQL, objConn << Line 18


Is there something wrong woth how i get my CheckDate ??

Herts the code

<%
Dim Today, SplitMonth, SplitDay, SplitYear, varDate, addZeroMonth,
addZeroDay
Dim MyDay, MyMonth, MyYear, CheckDate
Today = Date
If Month(Now) < 10 AND  Day(Now) > 10 Then
 SplitMonth = left(Today,1)
 SplitDay = Mid(Today, 3,2)
 addZeroMonth = True
 'Response.write " Month "
ElseIf Month(Now) > 10 AND  Day(Now) < 10 Then
' Response.write " Day "
 SplitMonth = left(Today,2)
 SplitDay = Mid(Today, 4,1)
 addZeroDay = True
ElseIf Month(Now) < 10 AND  Day(Now) < 10 Then
' Response.write " Both "
 SplitMonth = left(Today,1)
 SplitDay = Mid(Today, 3,1)
 addZeroMonth = True
 addZeroDay = True
ElseIf Month(Now) > 10 AND Day(Now) > 10 Then
' Response.write "None"
 SplitMonth = left(Today,2)
 SplitDay = Mid(Today, 4,2)
End If
SplitYear = Right(Today,4)
'If addZeroDay = True then
 'MyDay =  "0" & SplitDay
'Else
 MyDay = SplitDay
'End If
'If addZeroMonth = True then
 'MyMonth = "0" & SplitMonth
'Else
 MyMonth = SplitMonth
'End IF
MyYear = SplitYear


CheckDate =  MyDay &"/" & MyMonth & "/" & MyYear
'CDate("CheckDate")

%>
  -----Original Message-----
  From: Serge Wagemakers [mailto:swagemakers@d...]
  Sent: 24 May 2002 12:38
  To: ASP Web HowTo
  Subject: [asp_web_howto] RE: Compare Dates problem


  Nigel,

  Try this:

  strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND Deadline
>= #" & CheckDate & "#"

  HTH,

  Serge
    ----- Original Message -----
    From: Nigel
    To: ASP Web HowTo
    Sent: Friday, May 24, 2002 1:01 PM
    Subject: [asp_web_howto] RE: Compare Dates problem


    yeah i realised i should have removed the second  "WHERE" ... I have
done that and still probs..

    I have converted the date back to 5/25/2002

    Still get the error
    'ParentID=9 AND Deadline => 5/24/2002'.
    (0x80040E14)




      -----Original Message-----
      From: Willems Serge [mailto:Serge.Willems@c...]
      Sent: 24 May 2002 11:49
      To: ASP Web HowTo
      Subject: [asp_web_howto] RE: Compare Dates problem


      Try leaving the second "WHERE"
      or maybe you should try to convert the date into another format (eg:
05/24/2002)
        -----Original Message-----
        From: Nigel [mailto:nigel@m...]
        Sent: vrijdag, mei 24, 2002 12:31
        To: ASP Web HowTo
        Subject: [asp_web_howto] Compare Dates problem


        Hi could anyone help me compare 2 dates ...

        My databse is using UK format eg: 24/05/2002

        I am running an Access Databse and I keep getting this error

        Microsoft JET Database Engine (0x80040E14)
        Syntax error (missing operator) in query expression 'ParentID='9'
AND WHERE Deadline => 24/05/2002'.
        /mintweb/Minternal/client/furthedetails.asp, line 17

        Line 17 is
        strSQL = "SELECT * FROM tblJobMD WHERE ParentID='" & ID & "' AND
WHERE Deadline => " & CheckDate & ""

        And checkdate had a value of 24/05/2002
        Do i need to convert my CheckDate Variable into a date and if so how
..

        I Hope you understand what im asking as im not sure im clear enough
...

        Thanks in advance :)

        Nigel




        --- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
      --- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
    --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---
  --- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 ---


Message #11 by "Drew, Ron" <RDrew@B...> on Fri, 24 May 2002 08:02:01 -0400
This is a multi-part message in MIME format.

------_=_NextPart_001_01C2031A.D03D288A
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Is ParentID a numeric field??
strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID =3D " & ID & "  AND
Deadline >=3D #" & CheckDate & "#;"

Also add some response.writes for debugging and comment out your line 18
until everythings looks good with the response.writes



-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: Friday, May 24, 2002 7:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


Sorry still no joy ...

I get
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/mintweb/Minternal/client/furthedetails.asp, line 18

strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND
Deadline >=3D #" & CheckDate & "#"
>>  rsDetailMD.Open  strSQL, objConn << Line 18


Is there something wrong woth how i get my CheckDate ??

Herts the code

<%
Dim Today, SplitMonth, SplitDay, SplitYear, varDate, addZeroMonth,
addZeroDay
Dim MyDay, MyMonth, MyYear, CheckDate
Today =3D Date
If Month(Now) < 10 AND  Day(Now) > 10 Then
 SplitMonth =3D left(Today,1)
 SplitDay =3D Mid(Today, 3,2)
 addZeroMonth =3D True
 'Response.write " Month "
ElseIf Month(Now) > 10 AND  Day(Now) < 10 Then
' Response.write " Day "
 SplitMonth =3D left(Today,2)
 SplitDay =3D Mid(Today, 4,1)
 addZeroDay =3D True
ElseIf Month(Now) < 10 AND  Day(Now) < 10 Then
' Response.write " Both "
 SplitMonth =3D left(Today,1)
 SplitDay =3D Mid(Today, 3,1)
 addZeroMonth =3D True
 addZeroDay =3D True
ElseIf Month(Now) > 10 AND Day(Now) > 10 Then
' Response.write "None"
 SplitMonth =3D left(Today,2)
 SplitDay =3D Mid(Today, 4,2)
End If
SplitYear =3D Right(Today,4)
'If addZeroDay =3D True then
 'MyDay =3D  "0" & SplitDay
'Else
 MyDay =3D SplitDay
'End If
'If addZeroMonth =3D True then
 'MyMonth =3D "0" & SplitMonth
'Else
 MyMonth =3D SplitMonth
'End IF
MyYear =3D SplitYear



CheckDate =3D  MyDay &"/" & MyMonth & "/" & MyYear
'CDate("CheckDate")

%>

-----Original Message-----
From: Serge Wagemakers [mailto:swagemakers@d...]
Sent: 24 May 2002 12:38
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


Nigel,

Try this:

strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND
Deadline >=3D #" & CheckDate & "#"

HTH,

Serge

----- Original Message -----
From: Nigel <mailto:nigel@m...> 
To: ASP Web HowTo <mailto:asp_web_howto@p...> 
Sent: Friday, May 24, 2002 1:01 PM
Subject: [asp_web_howto] RE: Compare Dates problem

yeah i realised i should have removed the second  "WHERE" ... I have
done that and still probs..

I have converted the date back to 5/25/2002

Still get the error
'ParentID=3D9 AND Deadline =3D> 5/24/2002'.
(0x80040E14)





-----Original Message-----
From: Willems Serge [mailto:Serge.Willems@c...]
Sent: 24 May 2002 11:49
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Compare Dates problem


Try leaving the second "WHERE"
or maybe you should try to convert the date into another format (eg:
05/24/2002)

-----Original Message-----
From: Nigel [mailto:nigel@m...]
Sent: vrijdag, mei 24, 2002 12:31
To: ASP Web HowTo
Subject: [asp_web_howto] Compare Dates problem


Hi could anyone help me compare 2 dates ...

My databse is using UK format eg: 24/05/2002

I am running an Access Databse and I keep getting this error

Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'ParentID=3D'9' AND
WHERE Deadline =3D> 24/05/2002'.
/mintweb/Minternal/client/furthedetails.asp, line 17

Line 17 is
strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
WHERE
Deadline =3D> " & CheckDate & ""

And checkdate had a value of 24/05/2002
Do i need to convert my CheckDate Variable into a date and if so how ..

I Hope you understand what im asking as im not sure im clear enough ...

Thanks in advance :)

Nigel




--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---


Message #12 by "Serge Wagemakers" <swagemakers@d...> on Fri, 24 May 2002 14:12:42 +0200
This is a multi-part message in MIME format.

------=_NextPart_000_013C_01C2032D.11F1DBF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Nigel,

Just take the SELECT-statement and run it in access itself. That will 
probably give you clues as to why the query isn't running as it's 
supposed to.

The statement would be:

SELECT * FROM tblJobMD WHERE ParentID=3D'9' AND Deadline >=3D 
#5/24/2002#

BTW, are you sure that the ParentID isn't the problem instead of the 
date you're trying to check?

HTH,

Serge
  ----- Original Message -----
  From: Nigel
  To: ASP Web HowTo
  Sent: Friday, May 24, 2002 1:57 PM
  Subject: [asp_web_howto] RE: Compare Dates problem


  Sorry still no joy ...

  I get
  Error Type:
  Microsoft JET Database Engine (0x80040E07)
  Data type mismatch in criteria expression.
  /mintweb/Minternal/client/furthedetails.asp, line 18

  strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
Deadline >=3D #" & CheckDate & "#"
  >>  rsDetailMD.Open  strSQL, objConn << Line 18


  Is there something wrong woth how i get my CheckDate ??

  Herts the code

  <%
  Dim Today, SplitMonth, SplitDay, SplitYear, varDate, addZeroMonth, 
addZeroDay
  Dim MyDay, MyMonth, MyYear, CheckDate
  Today =3D Date
  If Month(Now) < 10 AND  Day(Now) > 10 Then
   SplitMonth =3D left(Today,1)
   SplitDay =3D Mid(Today, 3,2)
   addZeroMonth =3D True
   'Response.write " Month "
  ElseIf Month(Now) > 10 AND  Day(Now) < 10 Then
  ' Response.write " Day "
   SplitMonth =3D left(Today,2)
   SplitDay =3D Mid(Today, 4,1)
   addZeroDay =3D True
  ElseIf Month(Now) < 10 AND  Day(Now) < 10 Then
  ' Response.write " Both "
   SplitMonth =3D left(Today,1)
   SplitDay =3D Mid(Today, 3,1)
   addZeroMonth =3D True
   addZeroDay =3D True
  ElseIf Month(Now) > 10 AND Day(Now) > 10 Then
  ' Response.write "None"
   SplitMonth =3D left(Today,2)
   SplitDay =3D Mid(Today, 4,2)
  End If
  SplitYear =3D Right(Today,4)
  'If addZeroDay =3D True then
   'MyDay =3D  "0" & SplitDay
  'Else
   MyDay =3D SplitDay
  'End If
  'If addZeroMonth =3D True then
   'MyMonth =3D "0" & SplitMonth
  'Else
   MyMonth =3D SplitMonth
  'End IF
  MyYear =3D SplitYear


  CheckDate =3D  MyDay &"/" & MyMonth & "/" & MyYear
  'CDate("CheckDate")

  %>
    -----Original Message-----
    From: Serge Wagemakers [mailto:swagemakers@d...]
    Sent: 24 May 2002 12:38
    To: ASP Web HowTo
    Subject: [asp_web_howto] RE: Compare Dates problem


    Nigel,

    Try this:

    strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND 
Deadline >=3D #" & CheckDate & "#"

    HTH,

    Serge
      ----- Original Message -----
      From: Nigel
      To: ASP Web HowTo
      Sent: Friday, May 24, 2002 1:01 PM
      Subject: [asp_web_howto] RE: Compare Dates problem


      yeah i realised i should have removed the second  "WHERE" ... I 
have done that and still probs..

      I have converted the date back to 5/25/2002

      Still get the error
      'ParentID=3D9 AND Deadline =3D> 5/24/2002'.
      (0x80040E14)




        -----Original Message-----
        From: Willems Serge [mailto:Serge.Willems@c...]
        Sent: 24 May 2002 11:49
        To: ASP Web HowTo
        Subject: [asp_web_howto] RE: Compare Dates problem


        Try leaving the second "WHERE"
        or maybe you should try to convert the date into another format 
(eg: 05/24/2002)
          -----Original Message-----
          From: Nigel [mailto:nigel@m...]
          Sent: vrijdag, mei 24, 2002 12:31
          To: ASP Web HowTo
          Subject: [asp_web_howto] Compare Dates problem


          Hi could anyone help me compare 2 dates ...

          My databse is using UK format eg: 24/05/2002

          I am running an Access Databse and I keep getting this error

          Microsoft JET Database Engine (0x80040E14)
          Syntax error (missing operator) in query expression 
'ParentID=3D'9' AND WHERE Deadline =3D> 24/05/2002'.
          /mintweb/Minternal/client/furthedetails.asp, line 17

          Line 17 is
          strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & 
"' AND WHERE Deadline =3D> " & CheckDate & ""

          And checkdate had a value of 24/05/2002
          Do i need to convert my CheckDate Variable into a date and if 
so how ..

          I Hope you understand what im asking as im not sure im clear 
enough ...

          Thanks in advance :)

          Nigel




          --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---

        --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
      --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
    --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
  --- Improve your web design skills with these new books from 
Glasshaus. Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---


Message #13 by "Jeroen Diderik" <jeroen@i...> on Fri, 24 May 2002 15:18:16 +0200
This is a multi-part message in MIME format.

------_=_NextPart_001_01C20325.7707CE4E
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Is your ParentID not an integer field?
If it is then remove the single quotes around the value in your query...

Jeroen Diderik

	-----Original Message-----
	From: Nigel [mailto:nigel@m...]
	Sent: Friday, May 24, 2002 1:57 PM
	To: ASP Web HowTo
	Subject: [asp_web_howto] RE: Compare Dates problem
=09
=09
	Sorry still no joy ...
	
	I get
	Error Type:
	Microsoft JET Database Engine (0x80040E07)
	Data type mismatch in criteria expression.
	/mintweb/Minternal/client/furthedetails.asp, line 18
=09
	strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID & "' AND
Deadline >=3D #" & CheckDate & "#"
	>>  rsDetailMD.Open  strSQL, objConn << Line 18
	
	
	Is there something wrong woth how i get my CheckDate ??
	
	Herts the code
	
	<%
	Dim Today, SplitMonth, SplitDay, SplitYear, varDate,
addZeroMonth, addZeroDay
	Dim MyDay, MyMonth, MyYear, CheckDate
	Today =3D Date
	If Month(Now) < 10 AND  Day(Now) > 10 Then
	 SplitMonth =3D left(Today,1)
	 SplitDay =3D Mid(Today, 3,2)
	 addZeroMonth =3D True
	 'Response.write " Month "
	ElseIf Month(Now) > 10 AND  Day(Now) < 10 Then
	' Response.write " Day "
	 SplitMonth =3D left(Today,2)
	 SplitDay =3D Mid(Today, 4,1)
	 addZeroDay =3D True
	ElseIf Month(Now) < 10 AND  Day(Now) < 10 Then
	' Response.write " Both "
	 SplitMonth =3D left(Today,1)
	 SplitDay =3D Mid(Today, 3,1)
	 addZeroMonth =3D True
	 addZeroDay =3D True
	ElseIf Month(Now) > 10 AND Day(Now) > 10 Then
	' Response.write "None"
	 SplitMonth =3D left(Today,2)
	 SplitDay =3D Mid(Today, 4,2)
	End If
	SplitYear =3D Right(Today,4)
	'If addZeroDay =3D True then
	 'MyDay =3D  "0" & SplitDay
	'Else
	 MyDay =3D SplitDay
	'End If
	'If addZeroMonth =3D True then
	 'MyMonth =3D "0" & SplitMonth
	'Else
	 MyMonth =3D SplitMonth
	'End IF
	MyYear =3D SplitYear
	
=09

	CheckDate =3D  MyDay &"/" & MyMonth & "/" & MyYear
	'CDate("CheckDate")
	
	%>

		-----Original Message-----
		From: Serge Wagemakers [mailto:swagemakers@d...]
		Sent: 24 May 2002 12:38
		To: ASP Web HowTo
		Subject: [asp_web_howto] RE: Compare Dates problem
	=09
	=09
		Nigel,
		
		Try this:
		
		strSQL =3D "SELECT * FROM tblJobMD WHERE ParentID=3D'" & ID
& "' AND Deadline >=3D #" & CheckDate & "#"
		
		HTH,
		
		Serge

			----- Original Message -----
			From: Nigel <mailto:nigel@m...> 
			To: ASP Web HowTo
<mailto:asp_web_howto@p...> 
			Sent: Friday, May 24, 2002 1:01 PM
			Subject: [asp_web_howto] RE: Compare Dates
problem

			yeah i realised i should have removed the second
"WHERE" ... I have done that and still probs..
			
			I have converted the date back to 5/25/2002
			
			Still get the error
			'ParentID=3D9 AND Deadline =3D> 5/24/2002'.
			(0x80040E14)
			
			
			
			

				-----Original Message-----
				From: Willems Serge
[mailto:Serge.Willems@c...]
				Sent: 24 May 2002 11:49
				To: ASP Web HowTo
				Subject: [asp_web_howto] RE: Compare
Dates problem
			=09
			=09
				Try leaving the second "WHERE"
				or maybe you should try to convert the
date into another format (eg: 05/24/2002)

				-----Original Message-----
				From: Nigel
[mailto:nigel@m...]
				Sent: vrijdag, mei 24, 2002 12:31
				To: ASP Web HowTo
				Subject: [asp_web_howto] Compare Dates
problem
			=09
			=09
				Hi could anyone help me compare 2 dates
...
				
				My databse is using UK format eg:
24/05/2002
				
				I am running an Access Databse and I
keep getting this error
				
				Microsoft JET Database Engine
(0x80040E14)
				Syntax error (missing operator) in query
expression 'ParentID=3D'9' AND WHERE Deadline =3D> 24/05/2002'.
=09
/mintweb/Minternal/client/furthedetails.asp, line 17
			=09
				Line 17 is
				strSQL =3D "SELECT * FROM tblJobMD WHERE
ParentID=3D'" & ID & "' AND WHERE Deadline =3D> " & CheckDate & ""
				
				And checkdate had a value of 24/05/2002
				Do i need to convert my CheckDate
Variable into a date and if so how ..
				
				I Hope you understand what im asking as
im not sure im clear enough ...
				
				Thanks in advance :)
				
				Nigel
				
				
				
				
				--- Improve your web design skills with
these new books from Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

				--- Improve your web design skills with
these new books from Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

			--- Improve your web design skills with these
new books from Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

		--- Improve your web design skills with these new books
from Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---

	--- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20 ---



  Return to Index