DateAdd("d", 7 , today) error -->looking for end of statement

Results 1 to 7 of 7

Thread: DateAdd("d", 7 , today) error -->looking for end of statement

  1. #1
    na8ur Guest

    Default DateAdd("d", 7 , today) error -->looking for end of statement

    &#060;%<BR><BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>today = date<BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = DateAdd("d", 7, today) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR > &#060;% dim i<BR> i=0<BR> while not rs.EOF and i&#060;12<BR> i=i+1<BR> &#037;&#062;<BR>I just get this...<BR>800a0401<BR>What is wrong in here?? why? ...<BR>thx<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    1,315

    Default RE: DateAdd(

    &#060;% dim i<BR>i=0<BR>while not rs.EOF and i&#060;12<BR>i=i+1<BR>wend &#039 You forgot this<BR>&#037;&#062;<BR><BR>Note:<BR>&#060;% AB<BR>&#037;&#062;<BR>&#060;% CD<BR>&#037;&#062;<BR><BR>can be joined into:<BR>&#060;% AB<BR> CD<BR>&#037;&#062;

  3. #3
    na8ur Guest

    Default RE: DateAdd("d" is a problem

    I´ll have this "wend" ...but the Problems are the DateAdd("d" &#060;-- !<BR><BR>you might take a look at http://www.test.kunstmarkt.com <BR>Datum is the name of a cell.<BR>the full code is :<BR><BR>&#060;%<BR><BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>today = date<BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = DateAdd("d", 7, today) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR > &#060;% dim i<BR> i=0<BR> while not rs.EOF and i&#060;13<BR> i=i+1<BR> &#037;&#062;<BR>&#060;tr>&#060;td><BR>&#060;fon t face="Arial" size="+1">&#060;li>&#060;a href="http://www.kunstmarkt.com/Aktuell.asp" onClick="javascript:void(null);" target="news"><BR>&#060;%=rs("Tag")&#037;&#062;<BR ><BR><BR>&#060;%=rs("Ort")&#037;&#062;<BR><BR><BR> &#060;%=rs("Datum")&#037;&#062;<BR><BR><BR>&#060;% =rs("Titel1")&#037;&#062;<BR><BR>&#060;/a>&#060;/font><BR><BR>&#060;img src="image/menue/clear.gif" height="10" width="1"><BR>&#060;/td>&#060;/tr><BR>&#060;tr>&#060;td><BR><BR>&#060;% rs.Movenext<BR>wend<BR>rs.close&#037;&#062;&#060;% <BR><BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>today = date<BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = DateAdd("d", 7, today) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR > &#060;% dim i<BR> i=0<BR> while not rs.EOF and i&#060;13<BR> i=i+1<BR> &#037;&#062;<BR>&#060;tr>&#060;td><BR>&#060;fon t face="Arial" size="+1">&#060;li>&#060;a href="http://www.kunstmarkt.com/Aktuell.asp" onClick="javascript:void(null);" target="news"><BR>&#060;%=rs("Tag")&#037;&#062;<BR ><BR><BR>&#060;%=rs("Ort")&#037;&#062;<BR><BR><BR> &#060;%=rs("Datum")&#037;&#062;<BR><BR><BR>&#060;% =rs("Titel1")&#037;&#062;<BR><BR>&#060;/a>&#060;/font><BR><BR>&#060;img src="image/menue/clear.gif" height="10" width="1"><BR>&#060;/td>&#060;/tr><BR>&#060;tr>&#060;td><BR><BR>&#060;% rs.Movenext<BR>wend<BR>rs.close&#037;&#062;&#060;% <BR><BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>today = date<BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = DateAdd("d", 7, today) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR > &#060;% dim i<BR> i=0<BR> while not rs.EOF and i&#060;13<BR> i=i+1<BR> &#037;&#062;<BR>&#060;tr>&#060;td><BR>&#060;fon t face="Arial" size="+1">&#060;li>&#060;a href="http://www.kunstmarkt.com/Aktuell.asp" onClick="javascript:void(null);" target="news"><BR>&#060;%=rs("Tag")&#037;&#062;<BR ><BR><BR>&#060;%=rs("Ort")&#037;&#062;<BR><BR><BR> &#060;%=rs("Datum")&#037;&#062;<BR><BR><BR>&#060;% =rs("Titel1")&#037;&#062;<BR><BR>&#060;/a>&#060;/font><BR><BR>&#060;img src="image/menue/clear.gif" height="10" width="1"><BR>&#060;/td>&#060;/tr><BR>&#060;tr>&#060;td><BR><BR>&#060;% rs.Movenext<BR>wend<BR>rs.close&#037;&#062;&#060;% <BR><BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>today = date<BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = DateAdd("d", 7, today) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR > &#060;% dim i<BR> i=0<BR> while not rs.EOF and i&#060;13<BR> i=i+1<BR> &#037;&#062;<BR>&#060;tr>&#060;td><BR>&#060;fon t face="Arial" size="+1">&#060;li>&#060;a href="http://www.kunstmarkt.com/Aktuell.asp" onClick="javascript:void(null);" target="news"><BR>&#060;%=rs("Tag")&#037;&#062;<BR ><BR><BR>&#060;%=rs("Ort")&#037;&#062;<BR><BR><BR> &#060;%=rs("Datum")&#037;&#062;<BR><BR><BR>&#060;% =rs("Titel1")&#037;&#062;<BR><BR>&#060;/a>&#060;/font><BR><BR>&#060;img src="image/menue/clear.gif" height="10" width="1"><BR>&#060;/td>&#060;/tr><BR>&#060;tr>&#060;td><BR><BR>&#060;% rs.Movenext<BR>wend<BR>rs.close&#037;&#062;<BR><BR >but why

  4. #4
    Join Date
    Dec 1969
    Posts
    168

    Default RE: DateAdd(

    myDate=FormatDateTime((DateAdd("y",7,Now())),2)<BR ><BR>rs.Open "SELECT * FROM 3Sat WHERE Datum = myDate ORDER BY id asc","DSN=test.kunstmarkt.com"<BR><BR><BR>Hope this helps... Cheers!


  5. #5
    na8ur Guest

    Default Nope! not yet....trying aready the whole day

    Datum is the cell "formated" as Date/Time.<BR><BR>the error I get is... Parameter was expected, to little parameters brought.<BR>error: 80040e10<BR><BR>[the format of the cell is in european] like 25.06.99 but this shouldnt be a problem. <BR>..at the end I´d like to see the listing of the next events in the next 7 days....<BR><BR>thx alot!

  6. #6
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: DateAdd

    First off, what database are you using? SQL 7? Access? SQL 6.5?<BR><BR>I need to know this. In the mean time, I&#039d suggest replaceing "d" in DateAdd with &#039d&#039, use single ticks, and try replacing &#039d&#039 with &#039dd&#039.

  7. #7
    na8ur Guest

    Default RE: DateAdd..Access

    tried but just runs errors..<BR><BR>it works with DATUM = date() if DATUM is exactly the date like, today.<BR><BR>http://test.kunstmarkt.com/datum3.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •