Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 June 29th, 2004, 05:42 AM
Authorized User
 
Join Date: Apr 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending Dates to Stored Procedure

Hi,

I have two text boxes which when submitted sends user input dates to a stored procedure which returns results between those dates.

My problem is that the stored procedure will only work if American format dates are input into the text boxes.

How can I make this work when putting English format dates in the text boxes?

I'm pretty sure its a SQL thing as the stored procedure wont work in Query Analyzer with english dates (unless I run SET DATEFORMAT dmy first) I cant do this when calling the stored procedure from the page though...

this is driving me mad,

any help much much appreciated,

Pete

 
Old June 30th, 2004, 06:00 AM
Authorized User
 
Join Date: Apr 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK,

I formatted it in c# first:

DateTime dtDate =
Convert.ToDateTime(Request.Form["txtBox"].ToString()).Date;

(Thanks Chris)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Array to Stored Procedure in ItemUpdating kevorkian ASP.NET 2.0 Basics 3 June 11th, 2008 08:54 AM
Stored procedure ashuphp MySQL 1 April 2nd, 2007 04:20 PM
Stored Procedure bmains SQL Server ASP 2 October 8th, 2004 03:19 AM
Stored Procedure to.... flyin ADO.NET 3 March 3rd, 2004 02:01 AM
Sending an e-mail from a stored procedure cooldude87801 Oracle 0 August 5th, 2003 04:35 PM





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