permaculture playing cards*
The moose likes JDBC and the fly likes MS Access and Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MS Access and Date" Watch "MS Access and Date" New topic
Author

MS Access and Date

Duane Riech
Ranch Hand

Joined: Feb 27, 2003
Posts: 52
I have a MS Access table which contains a Date tag on each record.
I want to retrieve records based on:
Today - 1 month
or
Today - 2 weeks
etc.
Can anyone tell me the syntax?
Thanks
Sam Moran
Ranch Hand

Joined: Sep 28, 2002
Posts: 86
I am assuming you want SYSDATE (minus) a number of days. If so, have you tried the following:
SYSDATE - 6?
I hope this helps.


We make a living by what we get, we make a life by what we give!
Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107


SCJP2 , MCP( 70-229 ) , Preparing For SCWDC
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MS Access and Date
 
Similar Threads
About convert datetype 'DATETIME' From SQL (access 2000)into JAVA
Date Format
Convert Datetype from Access database to Java 'DATETIME'
about date
How can convert DATETIME type to JAVA date type?