Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Date Validation

Posted on 1998-01-26
1
Medium Priority
?
183 Views
Last Modified: 2013-12-25
I am using ASP forms to enter data into a database. One of the fields is a date field, and I am trying to validate the data being entered is a legal date entry.
0
Comment
Question by:yolish
1 Comment
 
LVL 2

Accepted Solution

by:
Jagar earned 200 total points
ID: 1856720
Use the OnSubmit Event of the form that you are using to get the database information.  In that event check the Value of the Textbox that is surposed to hold the date.  You can check this by using the IsDate procedure of VBScript, ie.  If not IsDate(txtDate.Value) then alert "You must enter the date in this field."
If the person doesn't enter a date in the field then you can give them a msgbox and cancel the submission of the form.  Otherwise you can continue with the submission of the form.


Alternate method:  If there is a LostFocus Event for the control then you can check with the IsDate function at this point.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question