A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
compare field date from oracle to NOW ?
Joined: Jun 26, 2001
Nov 13, 2007 17:54:00
I have a table that has a column called end_date of type DATE :
ID ------- end_date
23 ------- 10/11/2007
I want to compare the current date with the date end_date returned from the oracle database, could you please help me.
thanks your help is appreciated.
Joined: Jun 20, 2005
Nov 13, 2007 18:14:00
Do you have the oracle odbc connection already setup in
If so then use java calendar (date was/is depricated).
1.Create a new Calendar object. Calendar cDate = new Calendar() or Calendar cDate =Calendar.getInstance(); I forget which.
2.Use your odbc connection to store the date from your oracle database into a Calendar object. Calendar dbDate = select statement (guessing here)
3. Use cDate.(compareTo(Calendar anotherCalendar) to compare the dates.
I agree. Here's the link:
subject: compare field date from oracle to NOW ?
comparing two time strings please help urgent
To get the date one week from current date
TIme comparison how do i compare two times urgent please help
Need help in an query development
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014