Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting String to date in webpage

Status
Not open for further replies.

cisscott

IS-IT--Management
Apr 21, 2003
115
US
Dreamweaver MX 6.1
SQL Server 2000

Hi all. I set up a web page to search our customer comments database. I wrote a simple SQL query to select the recordset. I have a conflict between the date in the database and the date variable in the webpage app. Here is the code:
Code:
SELECT *
FROM [COMMENT].[dbo].[comment2005]
WHERE [comment2005].[cust_Lname] = 'varLname' or   [comment2005].[id] = 'varRecordID' or   [comment2005].[show_date] = 'varShowdate'

I can convert string data to Dates in SQL Server no problem, but i cant seem to make it happen in the web page server behavior script. The database field [comment2005].[show_date] is a datetime value, and I guess DW is formatting the page variable as string. Can anyone give me the syntax for this? Maybe i just need to DIM the show_date variable differently in Dreamweaver? Please include brackets and quotes, I havent figured out the system DW uses when communciating with SQL Server yet.. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top