Date Comparison

Results 1 to 4 of 4

Thread: Date Comparison

  1. #1
    Join Date
    Dec 1969
    Posts
    517

    Default Date Comparison

    I&#039m having trouble comparing 2 dates for expiring a password. Is there a function that converts the date to a number? Thanks.

  2. #2
    sean green Guest

    Default RE: Date Comparison

    use DateDiff()<BR><BR>for example:<BR><BR>If DateDiff("d",Application("date"),Date) &#060;> 0 Then<BR> response.write "this is out of date"<BR> Application("date") = Date<BR>End If

  3. #3
    Join Date
    Dec 1969
    Posts
    1

    Default Date Comparison

    I have a similar problem. I&#039;m working with a press release database and would like my SQL statement to only grab the releases from the past three months. How do I get my SELECT statement to subtract three months from today&#039;s date and then compare it to the release date?

  4. #4
    Join Date
    Dec 1969
    Posts
    50

    Default RE: Date Comparison

    Dim strDate,Days<BR>Days = -90&#039;equivalent of 3 months<BR>strDate = DateAdd("d",Days,Date())


Posting Permissions

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