473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

date validate

Hi,

How can I validate a date, like 3/26/04, before submitted?
Thanks for any idea.

--
Andrew

Jul 19 '05 #1
5 1967
If you want to do it BEFORE it's submitted, you'd want to use client-side
code for that, not ASP.

If you want ASP examples, can you answer these questions?

1. Validate it in what way? That it's a valid date? That it's a specific
day of the week? The the day number of the year is a primary number? That
it's not in the future? That it's one of a few in a list of specific dates?
ETc. etc.

2. What language are you using in your ASP pages?

Ray at work

"Andrew" <du******@yahoo.com> wrote in message
news:sj************@news04.bloor.is.net.cable.roge rs.com...
Hi,

How can I validate a date, like 3/26/04, before submitted?
Thanks for any idea.

--
Andrew

Jul 19 '05 #2
Yes, I want client side validation samples. Because the datetime field of
table of DB only accept 03/26/2004, 3/26/2004 or 03/26/04, how can I make a
client side script to validate the date value? I prefer Jscript to VBs in
client side, and reverse in server side. Thanks

--
Andrew
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:Oe**************@TK2MSFTNGP09.phx.gbl...
If you want to do it BEFORE it's submitted, you'd want to use client-side
code for that, not ASP.

If you want ASP examples, can you answer these questions?

1. Validate it in what way? That it's a valid date? That it's a specific day of the week? The the day number of the year is a primary number? That it's not in the future? That it's one of a few in a list of specific dates? ETc. etc.

2. What language are you using in your ASP pages?

Ray at work

"Andrew" <du******@yahoo.com> wrote in message
news:sj************@news04.bloor.is.net.cable.roge rs.com...
Hi,

How can I validate a date, like 3/26/04, before submitted?
Thanks for any idea.

--
Andrew


Jul 19 '05 #3

"Andrew" <du******@yahoo.com> wrote in message
news:RA*************@news04.bloor.is.net.cable.rog ers.com...
Yes, I want client side validation samples.
This group focuses on server-side programming. If you want to use client
side, try a javascript group or m.p.scripting.jscript.
Because the datetime field of
table of DB only accept 03/26/2004, 3/26/2004 or 03/26/04,


Oh really? what kind of odd database system is this? Please READ this.
http://www.aspfaq.com/show.asp?id=2260 If you don't read at all, at least
search the page for "YYYYMMDD" and read the area around it.

Ray at work
Jul 19 '05 #4
I meant "If you don't read IT all." I wasn't trying to say you don't read
AT all. Oops!

Ray at work

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:uA**************@TK2MSFTNGP11.phx.gbl...
If you don't read at all, at least
search the page for "YYYYMMDD" and read the area around it.

Jul 19 '05 #5
"Andrew" <du******@yahoo.com> wrote in message
news:RA*************@news04.bloor.is.net.cable.rog ers.com...
Yes, I want client side validation samples. Because the datetime field of
table of DB only accept 03/26/2004, 3/26/2004 or 03/26/04, how can I make a client side script to validate the date value? I prefer Jscript to VBs in
client side, and reverse in server side. Thanks


Keep in mind that client side validation is not reliable. What happens when
someone comes along with JavaScript turned off? If this is critical, you
would be better off doing this server side, or possibly both (JavaScript to
provide instant validation, Server Side to catch those that fall through the
cracks by having JS turned off).

Regards,
Peter Foti
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Simon | last post by:
Hi there. I have a form on which I have a date of expiry which is built from 3 select fields to build the day, month and year, this all works OK and the data is being built and added to the...
4
by: Frank Rocco | last post by:
Hello, What is the best way to validate a textbox to see if it contains a valid date or a valid time or both? Thanks Frank
6
by: RSB | last post by:
Hi Every one Need some help to Validate the Date i have in the Form. ALso how to Convert the Date Data i read from table to yyyy/MMM/dd format. Thanks RSB
7
by: James P. | last post by:
Hello there, In my asp.net page using VB, I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is greater than or equal to the...
1
by: viki.sanjeeva | last post by:
Hi, There is a date field in JSP form where user will enter date in dd-mm-yyyy format. Now before saving into DB2, I want to validate the date format against dd-mm-yyyy format and then save into...
4
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating...
17
by: Petyr David | last post by:
Just looking for the simplest. right now my perl script returns an error messge to the user if the date string is invalid. would like to do this before accessing the server. TX
3
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I have VS 2005 (C#) There is a control numericUpDown so you can spin numeric values. What I need to do is to spin date (+- one day). How to do that? Moreover, I want a user to type the date as...
3
by: samuelberthelot | last post by:
Hello, I would like to validate a date in a textbox on the onChange event. The date must be in the format 01/01/2007 I would like to use a regular expression to validate it but I'm not very...
5
by: shapper | last post by:
Hello, What is the Regex expression to validate a date time format as follows: dd-mm-yyyy hh:mm:ss An example: 20-10-2008 10:32:45
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.