wood burning stoves 2.0*
The moose likes JDBC and the fly likes Dates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Dates" Watch "Dates" New topic
Author

Dates

Julie Ferry
Greenhorn

Joined: Aug 12, 2002
Posts: 1
Does anyone know how to deal with dates on an on-line booking site??
If a person enters a date they wish to book, i do not know how to check these with with those already booked and stored in a database (oracle) to find out if these dates are available.
I am completely stuck with this!!
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Julie Ferry:
Does anyone know how to deal with dates on an on-line booking site??
If a person enters a date they wish to book, i do not know how to check these with with those already booked and stored in a database (oracle) to find out if these dates are available.
I am completely stuck with this!!

"select count(*) from bookings where booking_date = '01-JAN-95'" where '01-JAN-95 is in the default format for your database. If the count returned is > 0, then that date has already been booked. Also you can use the PreparedStatement :

Hope this helps,
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dates
 
Similar Threads
Working with SimpleDateFormat and DAte classes
Date comparision in java
Getting months from date
difference in weeks
Creating classes