D
damon.f
I've got a classic ASP application that I'm migrating
to .NET. In the client script we used to use the
following code to help build up the sql string. It
converted a text date to the SQL Server Date format.
sSQL = sSQL + SQLServerDate(Request.Form
("PLANNEDEXITDATE")) + ","
I'm now trying to do this server side in VB.NET but I
can't seem to find a way to do it using convert or
CType. They all complain they cannot convert strings to
sqldatetime format. Also there seems to be no conversion
to a plain SQLServerDate.
mydate = CType(Convert.ToDateTime(PLANNEDEXITDATE),
SqlTypes.SqlDateTime)
I'm sure this is really simple but it's eluding me at
present. Does any one have an idea?
Thanks
Damon
to .NET. In the client script we used to use the
following code to help build up the sql string. It
converted a text date to the SQL Server Date format.
sSQL = sSQL + SQLServerDate(Request.Form
("PLANNEDEXITDATE")) + ","
I'm now trying to do this server side in VB.NET but I
can't seem to find a way to do it using convert or
CType. They all complain they cannot convert strings to
sqldatetime format. Also there seems to be no conversion
to a plain SQLServerDate.
mydate = CType(Convert.ToDateTime(PLANNEDEXITDATE),
SqlTypes.SqlDateTime)
I'm sure this is really simple but it's eluding me at
present. Does any one have an idea?
Thanks
Damon