|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
VBscript - AddDate Function using a variable
Hello,
I need to use the AddDate Function but include a variable to using a variable. so instead of .... DateAdd("d", 7, Now()) Instead of the "7" - I would like to use a variable i.e. Dim variable variable = request ("textbox_value") Response.Write DateAdd("d", " & variable & ", Now()) I cant seem to get this to work. has anyone got any ideas?? Thanks |
|
#2
|
|||
|
|||
|
Dont use " & X & "
use "'" & X "'" the "'" is " ' " it tells the compiler that U R using a var |
|
#3
|
||||
|
||||
|
Why not just
DateAdd("d", variable, Now()) |
|
#4
|
|||
|
|||
|
thanks. I had it working with just:
DateAdd("d", variable, Now()) |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VBscript - AddDate Function using a variable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|