The intelligent splitting automatically identifies the date fields in specific formats. This topic describes the detailed definitions on date formats which are adaptive to the intelligent splitting function.
The time must contain precise year, month, day, hour, minute, and second fields. You can add millisecond and time zone fields in the following date formats.
For more information about the format conventions, see SimpleDateFormat.
Common date formats
A common date format is a common time format used in the logs. In general, a common date format contains the data of year, month, day, hour, minute, and second split by a regular separator. The year/month/day part and the hour/minute/second part can be split with a separator or a capital letter "T". The second field can be followed by a millisecond field after a separator "," or ".". Then, you can append the standard time zone field.
Among the separators, the capital letter "T" can be replaced with space or other separators; ":" can be replaced with other separators; the separators between year, month, and day fields, and the separators between hour, minute, and second fields can be replaced with common separators such as "/" or "-". For example,
1963-04-17T23:51:12 1963/04/17 12:12:53
Where "," can be replaced with ".". The separators at other locations can be replaced with other separators as aforementioned. For example,
1963/04/17 12:12:53,172 1963/04/17T12:12:53.172
1963/04/17 12:12:53+0800 1963/04/17T12:12:53-0700
1963/04/17 12:12:53,999+0800 1963/04/17T12:12:53.878-0700
Fixed standard time formats
The fixed standard time formats indicate the commonly used date formats which can be translated into the date regular expression in SimpleDateFormat, such as the time format where no separator is used between year, month, and day fields, and common time format in the format of month/day/year.
Type 1: No separator is used between any date and time field
Type 2: The date format is in the reverse order, namely, dd-MM-yyyy.
Some common date formats in SimpleDateFormat
Some common date formats in the SimpleDateFormat official documentation are described as follows. For more information, see the SimpleDateFormat official documentation. The time must contain the precise year, month, day, hour, minute, and second fields.
yyyy.MM.dd G 'at' HH:mm:ss z
2001.07.04 AD at 12:08:56 PDT
EEE, MMM d, ''yy
Wed, Jul 4, '01
yyyyy.MMMMM.dd GGG hh:mm aaa
02001.July.04 AD 12:08 PM
EEE, d MMM yyyy HH:mm:ss Z
Wed, 4 Jul 2001 12:08:56 -0700
Other special date formats
- For example, Nginx date format