Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DATE VALIDATION

Author  Topic 

hizakemi
Starting Member

33 Posts

Posted - 2007-03-07 : 10:59:40
Guys,
I hope I will be able to get this.

I'm looking a cripts/code that will validate date in my form when the user key in date. The date has to be in the following format 00/00/0000 (month/ day/ year)


HELP

Thk

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-07 : 11:06:27
This has nothing to do with SQL server, it's a front-end task. In SQL, you should have stored procedures that accepts DateTime parameters from the client, and the client's job is to make sure that it can cast whatever input it receives into a valid datetime value.

What language are you coding your form in?

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

hizakemi
Starting Member

33 Posts

Posted - 2007-03-07 : 11:12:25
I'm using jave scripts

Thk

quote:
Originally posted by jsmith8858

This has nothing to do with SQL server, it's a front-end task. In SQL, you should have stored procedures that accepts DateTime parameters from the client, and the client's job is to make sure that it can cast whatever input it receives into a valid datetime value.

What language are you coding your form in?

- Jeff
http://weblogs.sqlteam.com/JeffS


Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-07 : 12:28:43
Ah, a web application... I may have confused you, then, by using the term "client". I meant client in respect to SQL Server, not the web browser.

So, what web server programming technology (i.e., ASP.NET? ASP? other) are you using to execute your SQL statements? web browser validation is nice and can save a post back or a page re-load, but you always have to validate your data using your web server code before putting it into a database.


- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -