Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 16th, 2004, 09:37 AM
extremekid extremekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 extremekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Getting a date value a week from now

hi i have a query in which i want to show all the records which have a date value <= 7 days from now. I'v tried <=Now()+7 in the criteria field??? can anyone help i'm really stuck


Reply With Quote
  #2  
Old February 16th, 2004, 09:47 AM
supersubra's Avatar
supersubra supersubra is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Coimbatore, India
Posts: 280 supersubra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 15 m 10 sec
Reputation Power: 6
Access will return value for date equations as follows
when currenttime is 02/16/04 9:20:33 PM
?now()+7
02/23/04 9:17:33 PM
?date()+7
02/23/04

and 02/23/04 refers to 02/23/04 00:00 AM

so use <= date()+8



Quote:
Originally Posted by extremekid
hi i have a query in which i want to show all the records which have a date value <= 7 days from now. I'v tried <=Now()+7 in the criteria field??? can anyone help i'm really stuck

__________________
V.Subramanian

Reply With Quote
  #3  
Old February 16th, 2004, 09:54 AM
extremekid extremekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 extremekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by supersubra
Access will return value for date equations as follows
when currenttime is 02/16/04 9:20:33 PM
?now()+7
02/23/04 9:17:33 PM
?date()+7
02/23/04

and 02/23/04 refers to 02/23/04 00:00 AM

so use <= date()+8


I've tried this and no luck it still brings up all records. I've tried using <=Date()+7 but i'm iven an error saying date is undefined???? which i find very strange do you know why it would say his???

Reply With Quote
  #4  
Old February 16th, 2004, 10:02 AM
supersubra's Avatar
supersubra supersubra is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Coimbatore, India
Posts: 280 supersubra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 15 m 10 sec
Reputation Power: 6
Check whether your field in the table has datatype Date/Time
If it is so it should work. If you still have problem then post the query and table structure.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Getting a date value a week from now


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT