GeeCON Prague 2014*
The moose likes JDBC and the fly likes java date time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "java date time" Watch "java date time" New topic
Author

java date time

pawan sharma
Greenhorn

Joined: Feb 12, 2001
Posts: 7
i want to store the date at which the record is inserted.I have a lot of data in my database and i want to show the data in the
sequence of date .
and i want that user see data 2daysbefore or 3days before
4days,9days
for this purose which sqlQuery shoud be used and which logic shoud be used.

i do this i got time in seconds through getTime(),function and inserted in to database when a record is inserted both at a time.
i want that user can see data twodays before,10daysbefore,---alldata which depends upon user's choice.i can got days by subtra
-ctng seconds at which record is inserted by current seconds.and got days but how can update database how can use sql query to display two days record ;10days----allrecords.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
This is really more of a database question than a servlet one, so I've moved it to the JDBC forum.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
Consider Paul's rocket mass heater.
 
subject: java date time