Date And Time Fields

JED and DataTables allow you to format your Date fields to include a time signature. JED has a class named DateFormat. This class has a method named setCustomFormat(String datePattern). DateFormat uses class java.text.SimpleDateFormat internally, so you can base your datePattern parameter on the options provided in SimpleDateFormat. NOTE: Databases make a distinction between two data types: DATE and DATETIME. When making your table with a time stamp, be sure to select DATETIME type if you want to include a time portion.

This example would simulate an application that allows the user to set up a shift schedule. For each record, you would select a location and set the start and end times.

View the JavaScript and Java tabs to see how we provided the date formatting. This example copies the original example at http://editor.datatables.net/examples/dates/datetime.html

Live example


Date Format: Month-Day-Year hours:minutes AM/PM

LOCATION START DATE & TIME END DATE & TIME
Loading data from server
LOCATION START DATE & TIME END DATE & TIME


Javascript
HTML
Java
Includes