Print Page | Close Window

Value not showing

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8467
Printed Date: 01 April 2026 at 7:19am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Value not showing
Posted By: twooly
Subject: Value not showing
Date Posted: 31 December 2003 at 5:18pm

Can someone explain why I am not getting the value I want.  I am always seeing 0 even though I have a record in the DB with the value of 12/31/2003 in the Timestamp column.  It is an Access DB with the shortdate type for the Timestamp column.

 

sql="SELECT * FROM tblUsers WHERE Timestamp = #"& date() &"#"

 rsUserReport.Open sql, adoCon
    Dim rSum
 rSum=0
 Do While Not rsUserReport.EOF
  rSum=rSum+1
  rsUserReport.MoveNext
 Loop
 rsUserReport.close

Response.Write (  rSum  )

 




Replies:
Posted By: twooly
Date Posted: 31 December 2003 at 5:42pm
Nevermind I got it figured out.  For some reason the db structure was cached as a different value


Posted By: dj air
Date Posted: 31 December 2003 at 6:19pm
DATE() is used to get the server date that is why you wheren't getting the value  you thought. Its like TIME() and NOW()



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net