<parse-date>

Purpose/Function

Converts the date-time formatted string into a java.util.Calendar object, then creates an array of strings corresponding to the following:

0

Calendar.YEAR

4 places

1

Calendar.MONTH

2 places

2

Calendar.DATE

2 places

3

Calendar.HOUR_OF_DAY

2 places

4

Calendar.MINUTE

2 places

5

Calendar.SECOND

2 places

6

milliseconds

3 places

Leading zeros are preserved. The array is assigned to the environment.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

declare

boolean

true

declare the variable (else assign it)

format

java.lang.String

(required)

formatted date-time string

formatted

java.lang.String

yyyy/MM/dd HH:mm:ss

format to use in interpreting the string

global

boolean

false

put on global frame

gmt

boolean

false

convert time-zone to GMT

name

type

(required)

assign to environment with this name

Elements

None.

ReturnValues

None.

NOTES

See also the future-time task.

Examples

<ogrescript>
   ...
   <parse-date formatted="2007/08/24 14:22:02" name="currentDT"/>
   ...	
</ogrescript>
  • No labels