Checking for dates

Results 1 to 2 of 2

Thread: Checking for dates

  1. #1
    Join Date
    Dec 1969

    Default Checking for dates

    &nbsp;<BR>I have 2 date fields in my database , Date_From and Date_To.<BR>and 2 time fields Tome_From and Time_To<BR>Before I add another new item to the database I need to check if that item has beem booked for those dates and Times. How would I write my SQL.<BR><BR>Date fields 2/1/01<BR>time fields 8:00 AM

  2. #2
    Join Date
    Dec 1969

    Default RE: Checking for dates

    hmm<BR><BR>Well<BR>i suppose it depends on the db.<BR><BR>I would join the two date fields to their time fields <BR>and cast that to a datetime.<BR><BR>then <BR>use the between statement<BR>or<BR>if ((begindate &#060;= datepassedin) AND (enddate &#062;= datepassedin))

Posting Permissions

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