thatelvis
asked on
date error adding 28 days
Hello,
This is what I have been using for a while and it worked no problem but suddenly it stopped working, I think maybe my host might have configured something.
<% ' adds 28 days to date,
Dim nonactivedate
nonactivedate = DateAdd("d", 28, Now())
%>
I want to add 28 days to todays date, I am using asp page and a ms 2005 sql database.
is there anything I can do to correct this.
this is the error
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. "
regards and thank you
k
This is what I have been using for a while and it worked no problem but suddenly it stopped working, I think maybe my host might have configured something.
<% ' adds 28 days to date,
Dim nonactivedate
nonactivedate = DateAdd("d", 28, Now())
%>
I want to add 28 days to todays date, I am using asp page and a ms 2005 sql database.
is there anything I can do to correct this.
this is the error
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. "
regards and thank you
k
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
that won't work, as the dateadd() function in vbscript and sql is different...
anyhow, that does not show the relevant sql part?
anyhow, that does not show the relevant sql part?
ASKER
angel thank you
I use dreamweaver and an update behaviour, I have a table with 14 odd columns but it is only the date column on this ocassion needs updating. I would prefer to grab the value from a hidden field as it has always worked before but for the life of me cannot understand what has changed lately.
k
I use dreamweaver and an update behaviour, I have a table with 14 odd columns but it is only the date column on this ocassion needs updating. I would prefer to grab the value from a hidden field as it has always worked before but for the life of me cannot understand what has changed lately.
k
ASKER
Angel I got it but thank you for been there
<%= (now() + 28) %>
I was using a webassist extension and gosh are they crap sometimes.
hope your well
thanks again
k
<%= (now() + 28) %>
I was using a webassist extension and gosh are they crap sometimes.
hope your well
thanks again
k
ASKER
thank you
ASKER
using this
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<%= DATEADD(day, 28, GETDATE()) %>
</body>
</html>
I ge this error
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'day'
/a.asp, line 10