By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

date range

P: 1
hi to everybody
need help in selecting date range from for example 08/31/2007 to 09/01/2007
tryed many time no results :(
Sep 5 '07 #1
Share this Question
Share on Google+
2 Replies


Scott Price
Expert 100+
P: 1,384
hi to everybody
need help in selecting date range from for example 08/31/2007 to 09/01/2007
tryed many time no results :(
Is this being used in a query?

General syntax for that is BETWEEN #[DateOne]# And #[DateTwo]#

Remember that when comparing literal date values you must use the # tags to separate them.

Regards,
Scott
Sep 5 '07 #2

P: 47
Actually the DATE syntax can be pretty horrific since it expects a US date format which is often at variance with your Regional settings. Since the date is stored as a long integer in Access anyway my workaround is to convert my input dates to LONGs first.
e.g

Expand|Select|Wrap|Line Numbers
  1. "Select WhatEver. where [Date] between " & Clng([StartDate]) & " AND " & Clng([EndDate])
Sep 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.