Getting Nearest Date

Results 1 to 2 of 2

Thread: Getting Nearest Date

  1. #1
    Join Date
    Dec 1969

    Default Getting Nearest Date

    I&#039;ve got an event table and I want to be able to select the nearest date to &#039;today&#039;. Respective columns include:<BR><BR>EventID<BR>EventDate<BR><BR>There must be a simple way to do this but I&#039;m just learning ASP. Can anyone help me?

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting Nearest Date

    Several options, but I recommend doing it in the SQL query:<BR><BR>SELECT * FROM EventTable WHERE EventDate = (SELECT Max(EventDate) FROM EventTable)<BR><BR><BR><BR><BR><BR>

Posting Permissions

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