Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

now() 1

Status
Not open for further replies.

realhorrorshow

Technical User
Apr 24, 2001
24
GB
I have the statement: WHERE EntryDate >= (now() - 60) . I am using this to filter records into a 'new on the database' section. It works fine offline but not online. Online it sometimes displays all results or none of the results, never filtered. I put <%now -60%> on the page so i know it's getting the correct dates.

I have a feeling it could be a date format conflict. I checked throught the sql admin window what it was (2000-12-24) and changed my regional settings accordingly to make it appear the same in access. Still no joy. I am using an access DB converted into mysql.

Thanks

Tim
 
I have made teh same move from Access to my SQL and struggled with this for a couple of days.

Ended up with this snippet of code:

NewDate = datepart(&quot;yyyy&quot;,date())& &quot;-&quot; & datepart(&quot;m&quot;,date()) & &quot;-&quot; & datepart(&quot;d&quot;,date())
wrtlogUser = &quot;INSERT INTO userLog (userLog_Login, userLog_TimeIn, userLog_Date) VALUES (&quot; & valID & &quot;, '&quot; & TimeValue(Time()) & &quot;',&quot; & NewDate & &quot;);&quot;

Hope this helps
Steve Davis
hey.you@hahaha.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top