May 23, 2012, 09:46:25 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Mobile users - Our forum is Tapatalk enabled.
http://www.tapatalk.com/
Home
Help
Search
Login
Register
DotDragnet
>
The Tech Side
>
Tech stuff
>
Access date
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Access date (Read 471 times)
Shirker
Hero Member
Posts: 1625
Access date
«
on:
October 26, 2010, 03:27:40 PM »
I'm trying to tech myself Access 2010 as we need to get a better system for controlling mountains of health data the existing system is creaking now. I want to do a query which says
sort all the people who have a test coming due within the next six months of today's date
. Anyone know what the format for that would be? Something using =date () plus some time period?
Ta muchly.
Logged
Blog of a caravanist
Audiometry
noise assessments
Free health and safety procedures, policies and gubbins
samhs
Administrator
Hero Member
Posts: 1713
Re: Access date
«
Reply #1 on:
October 26, 2010, 06:47:56 PM »
select * from yourtable where datediff('d',now(),renewaldate)<184 order by renewaldate
That assumes you have a datetime column called renewaldate, and that your table is called yourtable, and that you're willing to accept 183 days as an approximation of 6 months.
hth
Logged
Loose
adj
a not held together; not fastened or firmly fixed in place
Lose
verb
to misplace something. To fail to keep or obtain something, especially because of a mistake, carelessness, etc.
---
Blog:
www.ohwrite.co.uk
Twitter:
www.twitter.com/samhs
Shirker
Hero Member
Posts: 1625
Re: Access date
«
Reply #2 on:
October 27, 2010, 09:13:59 AM »
Thanks Sam
Logged
Blog of a caravanist
Audiometry
noise assessments
Free health and safety procedures, policies and gubbins
Rosco
Global Moderator
Hero Member
Posts: 917
Re: Access date
«
Reply #3 on:
October 28, 2010, 04:02:33 PM »
I think datedif() also takes 'm' (for month) as an argument, so you could be more exact in months
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
=> Jee's Forum of Appalling Jokes
-----------------------------
The Creative Side
-----------------------------
=> Arty stuff
=> Photography
=> On the web
-----------------------------
The Tech Side
-----------------------------
=> Tech stuff
=> Hardware & Software
-----------------------------
The Business Side
-----------------------------
=> Anything business related
-----------------------------
The Practical Side
-----------------------------
=> Practical Advice
DotDragnet
>
The Tech Side
>
Tech stuff
>
Access date
Loading...