codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Date problem!! SQL query - Access DB - ASP VBScript  ricferrer at 13:10 on Friday, June 11, 2004
 

hello,
i would like to start by saying that i am not a real programmer, i try to do some stuff and most of the time it works.. :D, don't ask me how.

I have recently encountered a problem with dates. i get a "Data type mismatch in criteria expression" error.

I am using Access Database, and a text field where the dates are all in this format YYYY-M-D

i think there is a problem with # sign or something, but since i have very little knowledge of ASP i could not understand completely.

here is the code.
Aviso, is the table
PublicarDesde is the text field where the date is in YYYY-M-D format
Solicitud__Username is an irrelevant variable for this issue, but just in case, Ejecutivo is another field, and I'm getting only records that belong to the username in the cookie.



"SELECT * FROM Aviso
WHERE DateValue(PublicarDesde) > DateValue(today)
AND Ejecutivo = '" + Replace(Solicitud__Username, "'", "''") + "'"