Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2011, 09:43 AM
Authorized User
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default date input + asp + sql

Hi there

I've got a calendar field that outputs a date like: 28/01/2011 - I need to convert that to 28012011 before inserting it into my sql server field - how can I strip out the / separators?

thanks

Adam
 
Old January 25th, 2011, 09:17 AM
Authorized User
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default Error converting data type int to datetime.

As an addition to this I've made some progress but am stuck with the error: Error converting data type int to datetime.

My sql is this:

strSQL = "EXEC sp_date " & _
"" & strDate & ", " & _
"'" & Replace(Request("txtVenue"), "'", "''") & "', " & _
"'" & Replace(Request("txtLocation"), "'", "''") & "', " & _
"'" & Replace(Request("txtWebsite"), "'", "''") & "', " & _
"'" & Replace(Request("txtBookOnline"), "'", "''") & "'"

I'm struggling to work out why it's throwing this error:

The format it is getting the date in is

26012011 and the sql field type is datetime

thanks

Adam





Similar Threads
Thread Thread Starter Forum Replies Last Post
asp/sql auto email on specified date keyvanjan Classic ASP Databases 0 February 26th, 2006 03:34 AM
ASP insert into sql date problem markd Classic ASP Databases 1 February 18th, 2006 10:43 AM
Need help with ASP SQL Date problem bleutiger Classic ASP Professional 6 January 21st, 2005 12:41 AM
ASP SQL Date Problem Please help bleutiger Classic ASP Databases 5 January 20th, 2005 05:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.