Print Page | Close Window

Reading the Date

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=23091
Printed Date: 30 March 2026 at 5:58am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Reading the Date
Posted By: kpdillon
Subject: Reading the Date
Date Posted: 11 April 2007 at 12:53am
Hi, I am working on a mod and for some reason I can't seem to get the Event_date to match the variable even though they "appear" to look identical.  Is there something specific I need to add to my query to get 4/10/2007 in the database to match 4/10/2007 in my variable?
 
strsql = "SELECT "& strDbTable & "Topic.Event_date LIKE '" & strDate & "%' FROM " & strDbTable & "Topic ")

WHERE (" & strDbTable & "Topic.Event_date = " & strDate &
 
Is there something specifal about the colum Event_date in WebWiz that is preventing me from doing an easy variable to database value comparison?



Replies:
Posted By: jckruger
Date Posted: 17 April 2007 at 4:56am
Could you use the Now() event to get the current date?

http://www.codefixer.com/tutorials/date_time_now_hour_functions.asp - http://www.codefixer.com/tutorials/date_time_now_hour_functions.asp


Posted By: MrMellie
Date Posted: 17 April 2007 at 9:20am
Have you converted strDate into international format? There's a function in one of the WWF files (functions_date_time_format.asp) to do this for you.


Posted By: WebWiz-Bruce
Date Posted: 17 April 2007 at 9:53am
Depending on which database type you use depends on how the SQL needs to be formatted for dates, for example Access has # marks surrounding dates.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



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