Hi,
How can I validate a date, like 3/26/04, before submitted?
Thanks for any idea.
--
Andrew 5 1985
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.blo or.is.net.cable .rogers.com... Hi,
How can I validate a date, like 3/26/04, before submitted? Thanks for any idea.
-- Andrew
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******** ******@TK2MSFTN GP09.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.blo or.is.net.cable .rogers.com... Hi,
How can I validate a date, like 3/26/04, before submitted? Thanks for any idea.
-- Andrew
"Andrew" <du******@yahoo .com> wrote in message
news:RA******** *****@news04.bl oor.is.net.cabl e.rogers.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.j script.
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
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******** ******@TK2MSFTN GP11.phx.gbl... If you don't read at all, at least search the page for "YYYYMMDD" and read the area around it.
"Andrew" <du******@yahoo .com> wrote in message
news:RA******** *****@news04.bl oor.is.net.cabl e.rogers.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 database no problem.
However, I want to validate this date to ensure it is in the future, the
following validation does not work, any ideas?
'get data from form
|
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
|
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
|
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 current date. If not, I'd
like to display the error message to ValidationSummary.
It seems to make sense to me to use CompareValidator but the problem
is put the current date into CompareValidator. So, I created a hidden
text field in my aspx. ...
|
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 DB2.
I've tried reading SimpeDateFormat and other date format classes, but
couldn't understand. It will be great if somebody tell the following
with code.
| |
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 event of the control and add this code
|
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
|
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 well. So the control should validate the typed values on
the fly. Is it possible?
|
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 familiar with them. How can I do it ?
Thanks
|
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
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |