Expressing a Date Range

Results 1 to 2 of 2

Thread: Expressing a Date Range

  1. #1
    Join Date
    Dec 1969

    Default Expressing a Date Range

    I want to display a "new" graphic next to some text only if the record was added to the dbase within the last 30 days. Something like:<BR><BR>NewGraphic = rs("DateEntered") Between Date() And Date()-30 <BR><BR>But I&#039;m not sure how to express this in VBScript. Thanks for any suggestions.

  2. #2
    Join Date
    Dec 1969

    Default RE: Expressing a Date Range

    &nbsp;<BR>Sql="Select Count(RecordID) as Count From Table Where DateEntered &#062;=(Date-30) And DateEntered &#060;=Date;"<BR><BR>RS.Open Sql, YourDbConnection, 3, 3<BR><BR>If RS("Count") &#062; 0 Then<BR><BR>Put the image on the page<BR><BR>End If<BR><BR>RS.Close<BR>YourDBConnection.Close<BR>Se t RS=Nothing<BR>Set YourDBConnection=Nothing<BR><BR><BR>the end

Posting Permissions

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