Results 1 to 2 of 2

Thread: date validation

  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: date validation

    i have two params..
    @startdate datetime,@enddate datatime

    1.what's the best way to validate them
    2.Best way to check whether @startdate is less than @enddate

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1) use the ISDATE function

    2) use the less than operator, i.e. @startdate < @enddate
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •