All Products
Search
Document Center

Simple Log Service:Time formats

Last Updated:Apr 03, 2024

When you create a data import job, you must specify a format for the time field. This topic describes the syntax of time formats and provides examples of time formats.

Time format syntax

Character

Description

Example

G

Era designator

AD

y

Year

2001

M

Month

July or 07

d

Day

10

h

Hour in AM or PM (1 to 12)

12

H

Hour in day (0 to 23)

22

m

Minute

30

s

Second

55

S

Millisecond

234

E

Week

Tuesday

D

Day in year

360

F

Day of week in month

2

w

Week in year

40

W

Week in month

1

a

AM or PM

PM

k

Hour in day (1 to 24)

24

K

Hour in AM or PM (0 to 11)

10

z

Time zone

Eastern Standard Time

'

Delimiter

Delimiter

"

Double quotation mark

"

Time format examples

Note
  • XX: the ISO 8601 time zone. Example: +0800.

  • XXX: the ISO 8601 time zone. Example: +08:00.

  • zzz: the abbreviation of a time zone. Example: CST.

Date format

Parsing syntax

Parsed value (unit: seconds)

2020-05-02 17:30:30

yyyy-MM-dd HH:mm:ss

1588411830

2020-05-02 17:30:30:123

yyyy-MM-dd HH:mm:ss:SSS

1588411830

2020-05-02 17:30

yyyy-MM-dd HH:mm

1588411800

2020-05-02 17

yyyy-MM-dd HH

1588410000

20-05-02 17:30:30

yy-MM-dd HH:mm:ss

1588411830

2020-05-02T17:30:30Z

yyyy-MM-dd'T'HH:mm:ss'Z'

1588411830

2020-05-02T17:30:30.387Z

yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

1588411830

02/May/2020:17:30:30 +0800

dd/MMM/yyyy:HH:mm:ss XX

1588411830

02/May/2020:17:30:30 +08:00

dd/MMM/yyyy:HH:mm:ss XXX

1588411830

2/May/2020:17:30:30 +0800

d/MMM/yyyy:HH:mm:ss XX

1588411830

Sat May 02 17:30:30 CST 2020

EEE MMM dd HH:mm:ss zzz yyyy

1588411830