I am trying to get a date and then add it to the database.
To do this I am using (as a sample..)
If vDay = "TUESDAY" Or vDay = "2" Then
vDateEnd = DateTime.Now.AddDays(-2)
End If
I then want to put vDateEnd into the SQL. If I hardcode "09/16/2012" it works but I have played about (as you will see from the commetted out lines) to no avail.
'report not found so we need to create one
'Create dates in the report if doe not exist
'### Update
Dim ConnectionString3 As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("mySQLConnectionString").ConnectionString
Dim dsNames3 As SqlDataSource
Dim sSQL3 As String
dsNames3 = New SqlDataSource
dsNames3.ConnectionString = sConnString
sSQL3 = "spWeeklyR ...
Go to the complete details ...