html5 - How to insert date and time to oracle in java? -


i know oracle has date, datetime , timestamp types. have website made in java , looking method insert in oracle database dates , time in table appointments.

for example:

john has appointment @ job @ 12-jan-2016 21:00.

so, format day-month-year, hh24:minute.

i don't want include in application datepicker internet if possible.

how can done using jsp/html?

unfortunately, html5 type "date" isn't supported in ie or firefox. question whether or not idea use input fields, , somehow concatenate them "preparedsql statement" insert data right place in database?

that's normal/good approach anyway. make sure them form "parseable date/time" fields before going database, otherwise doesn't makes more sense "try store (or may be) wrong".

and not need concatenate fields in sql query, when reach database tier should passing normal datetime (hopefully...or similar), need 1 field (a ? in preparedstatement).

update:

you values jsp/html page; try build 1 of java objects specialized in handling date/time routines (datetime, calendar, date...or of formatters)...and go because have handles date/time input got user! , that's need use in preparedstatement.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -