Product DocsMenu

How to Specify Date Formats

Date formats are extracted using a string of values which indicates the position of the year, month, day, hours, minutes and seconds (note that the time in hours, minutes and seconds is optional).

Example: 05-31-2007 7:34:11 PM is extracted using %m-%d-%Y %H: %M: %S %p and 2007/5/31 7h34 PM is extracted using %Y/%m/%d %Hh%M %p.

The following table describes the string formats that you can use to extract date and time values.

Value Description

%Y

Four-digit year (ex.: 2007)

%y

Two-digit year (ex.: 07)

%m

Two-digit month (handles one-digit months, ex.: 2007/05/31 or 2007/5/31)

%o

Three-letter month (ex.: jan, may)

%d

Two-digit day (handles one-digit days, ex.: 2007/05/01 or 2007/05/1)

%H

Two-digit hour (handles one-digit hours, ex.: 12:30 or 4:30)

%M

Two-digit minute (ex.: 4:02)

%S

Two-digit second (ex.: 4:02:20)

%p

AM/PM detector

%G

Time zone (UTM)