edit-icon download-icon

Date formats in intelligent splitting

Last Updated: Apr 11, 2018

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.

  • yyyy-MM-ddTHH:mm:ss

    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
    
  • yyyy-MM-dd HH:mm:ss,SSS

    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
    
  • yyyy-MM-dd HH:mm:ssZ

    For example:

      1963/04/17 12:12:53+0800
      1963/04/17T12:12:53-0700
    
  • yyyy-MM-dd HH:mm:ss,SSS

    For example:

      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

    yyyyMMddHHmmss

      19551020233546
    

    yyyyMMdd HHmmss

      19551020 233546
    
  • Type 2: The date format is in the reverse order, namely, dd-MM-yyyy.

    dd-MM-yyyy HH:mm:ss

      17-04-1963 23:59:23
    

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
    
  • yyMMddHHmmssZ

      010704120856-0700
    
  • yyyy-MM-dd'T'HH:mm:ss.SSSZ

      2001-07-04T12:08:56.235-0700
    
  • yyyy-MM-dd'T'HH:mm:ss.SSSXXX

      2001-07-04T12:08:56.235-07:00
    

Other special date formats

  • For example, Nginx date format
      25/Aug/2012:16:41:07 +0800
    
Thank you! We've received your feedback.