Date Types

By default, the value of a date field should equal the number of milliseconds since January 1, 1970, 00:00:00 GMT. So instead of using Tue Jun 06 10:57:25 PDT 2000, we use the attribute:

”<EventAttribute
Name="DateOfPurchase">960314245921</EventAttribute>”.


You can specify the data type and format of an attribute as in the following example, which represents the attribute "Date of Purchase” where the data type is date and the format is mm-dd-yyyy:

<EventAttribute name=”DateofPurchase”
DataType=”date” Format=”MM-DD-YYYY”>05-06-2001</EventAttribute>


The data type will be either date, number, or string, and must be compliant with Java format. For example, the format for the Date field is:


Symbol

Meaning

Data Type

Example

G

era designator

(text)

AD

y

year

(number)

1996

M

month in a year

(text & number)

July & 07

d

day in a month

(number)

10

h

hour in am/pm (1–12)

(number)

12

H

hour in day (0 - 23)

(number)

0

m

minute in hour

(number)

30

s

second in minute

(number)

55

S

millisecond

(number)

978

E

day in week

(text)

Tuesday

D

day in year

(number)

189

F

day of week in month

(number)

2 (2nd Wed. in July)

w

week in year

(number)

27

W

week in month

(number)

2

a

am/pm marker

(text)

PM

k

hour in day (1 - 24)

(number)

23

K

hour in am/pm (0 - 11)

(number)

3

z

time zone

(text)

Pacific Standard Time