Explain the point of utilization of date/time type (date).

When you select "Date" from date, time type "date" "time" "date and time", items to handle year, month, day are prepared. The year can be specified in the range from 1753 to 9999.

Figure 1 Date type

Relationship with Java

Date type items are internally managed as java.sql.Date class.

The entered value is corrected by "filter". For details, please read "Input filter specifications".

Figure 2 Input filter

For date type items, input fields as shown in Fig. 3 are prepared.

Figure 3 Input field for date type item

Inputs other than numbers and hyphens ("-") result in errors as shown in Figure 4.If you enter it normally, it looks like Figure 5.

Figure 4 Input error
Figure 5 Input successful

When you click on the input field, the calendar is displayed as shown in Fig.

I call it Date Picker.

Figure 6 Calendar input

Definition method

From the "Input control" tab of the model item detail definition dialog, set the date input method to "use calendar". (The date type standard is "use of calendar".)

Figure 7 Setting to use calendar

Width of input field

By default, the width of the input field is the width of the calendar displayed as pulldown.You can adjust this width. For details, please refer to "Input control> input field length> date type (using calendar)".

You can also enter dates in list box format instead of calendar. Figure 8 is a list box for entering only the year.(We treat month and day as January 1 automatically.)

Figure 8 Specify Year in List Box

Figure 9 shows an example of entering year and month in list box format.(Day is automatically treated as one day.)

Figure 9 Specify the year and month in the list box

Figure 10 shows an example of entering the year, month, day in a list box format.

Figure 10 Specify the year, month, day in the list box

Specify the start and end year

When using the list box, you can specify the start year and end year (displayed as choices). Figure 11 shows an example in which the start year is 1950 and the end year is the current year.

Figure 11 Specify start year and end year

As shown in Figure 12, the year starts from 1950.

Figure 12 You can choose from 1950

Separate the specified formats with a comma as follows.


You can also use the notation "now" for the start and end years.This now means the current year. Here is an example.

We will be able to choose between 1950 and 2020.
We will be able to choose from 1950 until this year.
We will be able to choose between 10 years ago and 2020.
We will be able to choose between 50 years ago and 10 years later.

The date auto format function is a function to automatically convert from various input patterns to yyyy - MM - dd format.

Example (in case of calendar)

Enter "5 20" and convert automatically when you release the cursor.

Figure 13 Date auto format input
Figure 14 Date Auto Format Immediately after moving the cursor

Definition method (for calendar)

There is no definition part.For calendar input, date auto formatting is automatically enabled.(It can not be invalidated.)

Example (for text fields)

Enter "11 7" and convert automatically when you release the cursor.

Figure 15 Date auto format input
Figure 16 Date Auto Format Immediately after moving the cursor

Definition method (for text fields)

In the model item details dialog, set the date input method option to empty (directly input), and input the date directly in the text box. Then set the check on "Enable Date Auto Formatting Function".

Figure 17 Setting the Date Auto Format

Transformation pattern

An example of conversion pattern is shown below.

Input value After conversion
11 7 2014-11-07
H26 11 7 2014-11-07
2014/11/7 or 2014/11/07 2014-11-07
2014 11 07 2014-11-07
20141107 2014-11-07
s 47 5 15 1972-05-15
M (or M), t (or T), s (or S), h (or H) are special notation meaning Meiji, Taisho, Showa, Heisei respectively.

The date and time format is specified on the "Output control" tab.

Figure 18 Specifying the date and time format

It is a framework of output control, but it is also applied when entering.

Figure 19 yyyy-MM-dd
Figure 20 yyyy year MM month dd day

MM month specification and M month specification

The format is "MM month" "dd day" and "M month" "d day" are prepared.In MM or dd format, "January" is always written with two digits as January.

Figure 21 Date and time format choices

User defined

Instead of Wagby's standard format, the developer can write the format directly.

important point

  • If you specify a format that does not include "year" in the date type item, the year part is supplemented with "1970".Similarly, if you omit the month or day, it will be supplemented with "01".
  • To specify the Japanese calendar format and to use it in conjunction with the date auto format, set the input field to the calendar input format.(If the input field is a text field, the Japanese calendar format will be applied on the detail screen after saving.)

Input control

You can display it in a different date format next to the input field. Figure 21 shows an example of specifying the format "(Heisei Year Year Month Day Sun Day)".

Figure 21 Setting the option display

As shown in Figure 20, the date is displayed next to the entry field.This option display is valid on the registration and update screen.

Figure 22 Example of option display

The formats provided are as follows.

  • Heisei 0
  • Heisei ○ year ○ month
  • Heisei ○ year 0 month 0 day
  • ○ Days
  • Monday [Represent day of the week as one letter]
  • Heisei ○ year ○ month ○ ○ day ○ day of the week
This setting can not be used when "date, date and time, time format (user definition)" is specified.

Output control

Options can also be specified for output control.(FIGS. 23 and 24)

Figure 23 Option display setting (output control)
Figure 24 Example of option display (on output)

Please read "Do not display the initial value of date/numeric value" in "Input control>".

"Search control> Search range" Please read.

Heisei Year is listed as Heisei Year when you set the Japanese calendar format with "input control> date/time> option display (date)" and "output control> format".

On the input screen, we correspond to "option display (date)", but the date in the input field of the drop down calendar is displayed as "Heisei Year 1".This is a specification.
  • When the date type item is set as the primary key, only date format "yyyy - MM - dd" is allowed.Other formats can not be specified.
  • It is not possible to set calendar format input, list box format input, and date auto format at the same time.