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 July 28th, 2004, 12:55 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default shoakat

Hello,
 I want to validate mm/dd/year. If the user enters
dd/month/year/. It is an invalid entry. How can I write
the code in an asp

 
Old July 28th, 2004, 01:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Parse the date apart using mid() and instr(), then make sure that the values provided aren't higher than they are stated.

Your only problem is if the date Oct. 3, 2004 is in the format of 3/10/2004, well that is a valid entry.

Brian
 
Old July 28th, 2004, 03:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

You can probably use some Javascript Datepickers that allows the users to pick from there, than letting them key in the dates which you might have to validate. DatePickers can reduce your load of validating it, since user doesn't have to key in the date and possiblity of making mistakes is almost ruled out.

Take a look at this. Good one indeed. Got to just copy/paste the code.;)
http://javascript.internet.com/calen...te-picker.html

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
shoakat shoakat Classic ASP Databases 9 September 2nd, 2004 06:14 PM
shoakat shoakat Classic ASP Databases 2 August 6th, 2004 09:09 PM
Shoakat shoakat Classic ASP Databases 4 August 4th, 2004 06:46 AM
shoakat shoakat Classic ASP Databases 0 August 3rd, 2004 11:07 AM
shoakat shoakat Classic ASP Databases 4 July 26th, 2004 04:36 PM





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