Previous Topic

Next Topic

Book Contents

Book Index

Importing dates

When you import data, you can specify the format of date and time fields. You have to specify the format according to the standardized formatting used in Servoy which is shown below.

Within the sub-patterns, you specify formatting with special symbols:

Symbol

Meaning

Presentation

Used To Format

G

Era designator

Text

AD

y

Year

Number

1996

M

Month in year

Text & Number

July & 07

d

Day in 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

24

K

Hour in am/pm (0-11)

Number

0

z

Time zone

Text

Pacific Standard Time

'

Escape for text

Delimiter

(none)

''

Single quote

Literal

'

Here are examples of formatting dates and times:

Pattern

Output

dd.MM.yy

09.04.04

yyyy.MM.dd G 'at' hh:mm:ss z

2004.04.09 AD at 06:15:55 PDT

EEE, MMM d, ''yy

Thu, Apr 9, '04

h:mm a

6:15 PM

H:mm

18:15

H:mm:ss:SSS

18:15:55:624

K:mm a,z

6:15 PM, PDT

yyyy,MMMMM.dd GGG hh:mm aaa

2004.April.09 AD 06:15 PM

See Also

Importing and Exporting Data

Introduction to importing and exporting

Importing data from a text file

Importing data from an Excel file

Cancelling the importing of data

Exporting data as a text file

Exporting data as an Excel file

Cancelling the exporting of data