Date Question!! (Yesterday/today/tomorrow)

Results 1 to 2 of 2

Thread: Date Question!! (Yesterday/today/tomorrow)

  1. #1
    Join Date
    Dec 1969

    Default Date Question!! (Yesterday/today/tomorrow)

    hi,<BR><BR>I am trying to create a form with 3 radio buttons, each will have a date associated with it, ie. yesterday, today, tomorrow, when the form is submited it should select the appropriate date selected from the DB, Trying to get this working is a nightmare, Any help or sugestions would be great.

  2. #2
    Join Date
    Dec 1969

    Default RE: Date Question!! (Yesterday/today/tomorrow)

    do a select case or if statement on request.form("dateCheck")<BR><BR>mydate= DateAdd("d",1,Date)<BR>mydate=date<BR>mydate=DateA dd("d",-1,Date)<BR><BR>then just use sql<BR><BR>strSql="select * from myTable where myDateField=#" & varDate & "#"<BR><BR> use the # if you&#039;re using access use &#039; if sql server

Posting Permissions

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