Results 1 to 5 of 5

Thread: Error in SQL query containing Dates when invalid date is entered [resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member DKasler's Avatar
    Join Date
    Jan 2005
    Location
    Brooklyn, NYC
    Posts
    177

    Resolved Error in SQL query containing Dates when invalid date is entered [resolved]

    ok i have an SQL statement that generates an error if a non-existant date (ie. 2/30/2005) is entered in to the field text2

    VB Code:
    1. sSQL = "select patdob,insurance,vaccine,Dose,dov,type,datediff('m',patdob,dov),vaccine from vfcrec Where type='" & Combo1.Text & "' and dov between #" & Text1.Text & "# and #" & Text2.Text & "# and vaccine= '" & DBCombo1.Text & "' order by datediff('m',patdob,dov)asc ;"

    Is there any sort of statment like notdate or something I can use to tell the system that if the date can not exist on a calander to ignore the value?

    thanks tons =)
    Last edited by DKasler; Apr 26th, 2005 at 02:11 PM.
    -----MY SITES-----
    BayRidgeNights.Com - NYC Nightlife Forums

    Fight Communism - Rate Posts!

Posting Permissions

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



Click Here to Expand Forum to Full Width