I have a web-form where users can select a date from a calendar pop-up and a time from a dropdown. At the moment I am trying to store the date using a Date object.
Try this:
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MM/yyyy"); SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm:ss"); String dateAsString = dateFormatter.format(date); String timeAsString = timeFormatter.format(date);