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
 Other Forums
 Other Topics
 Detecting Valid Dates

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-09-17 : 15:44:19
Jaime writes "We are using Sybase and Transact SQL. I have a free format varchar column that may or may not contain a date value embedded in bytes 2 through 11. If present, the date could be in any of the following six formats; mm/dd/yyyy, mm/dd/yy, mmddyy, mmddyyyy, mm-dd-yyyy, mm-dd-yy. Is there any way I can detect that bytes 2 through 11 contain a valid date value?

PS. The varchar column is a user defined column. And the users were very, very stubborn on this issue."

   

- Advertisement -