Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
Java in General
casting date
Paula Vasseur
Greenhorn
Posts: 5
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want to enter day, month and year in separate drop down boxes on an Html form, but store these in a DATE column in my database as 12/06/03, how do i convert this, I am using JSPs.
Thanks Paula
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
I like...
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You want to do something like
import java.util.Calendar; import java.sql.Date; ... int year = ... int month = ... int day = ... Calendar c = new Calendar(); c.set(year, month, day); Date d = new Date(c.getTimeMillis());
Then you can use the Date object d in a setDate() call on a PreparedStatement, for instance.
[Jess in Action]
[AskingGoodQuestions]
Paula Vasseur
Greenhorn
Posts: 5
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks very much, got it working, you are a life saver.
Slainte Paula
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Unable to get Date instance in a particular format
Regarding HttpSession
first date and last date of month
PGP (Pretty Good Privacy)
choices.txt structure.
More...