Results 1 to 3 of 3

Thread: SQL in ASP

  1. #1
    Join Date
    Dec 1969

    Default SQL in ASP

    I am trying to write a query to tell me the difference between to dates, is this possible? I can format the date any way as long as I use day, month, and year. I can access the two dates from my database I just cant get the query right to tell me how many days are included in the two.<BR><BR>I am using an Access database. If this is even possible can someone help? Thanks.

  2. #2
    Join Date
    Dec 1969

    Default You are probably

    going to get flamed big time for this question..but I&#039;ll be nice.<BR>DateDiff(Date1,Date2)<BR><BR>BTW, check out the VBScript reference link to the left.

  3. #3
    Join Date
    Dec 1969

    Default You should be able to use DateDiff()

    Try this:<BR><BR>SELECT Date1, Date2, DateDiff("d", Date1, Date2) AS DifferenceInDays<BR>FROM TheTable<BR><BR>-Doug

Posting Permissions

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