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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Date Validation

Author  Topic 

chandrugbhatia
Starting Member

6 Posts

Posted - 2004-06-15 : 18:08:58
if i have a date going into a particular field. How do i validate that its in a particular format YYYYMMDD. If its not, it fails.

is this right

Select cr_rpt_dt from CR_RPT_EFX
where cr_rpt_dt = { d 'yyyy-mm-dd' }

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-06-16 : 05:55:49
i think that sql server saves all dates in the same format, doesn't it??
it's only the output mask that changes.
so i guess if you need to do validation do it in an application.

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -