SQL Stored Procedure to validate date
Posted on 2007-10-15
I am looking to design a SQL Stored Procedure (SQL Server 2000) that will validate a date. Now, before you think this is a normal date, here is a more specific definition of what I am looking to validate.
The field in the DB is a varchar field (10 chars I think) and the date format is: YYYYMMDD (i.e. 20071015)
It might sound a little whacked (and it is) but this is what I have to work with.
Of course, the SQL SP would have a parameter that would need to be passed to it, that being the date string as outlined above.
TIA for any help!