Previous Topic: Date SpecificationNext Topic: Date Range


Single Date

To specify an absolute date for a date parameter the value should be specified as milliseconds since 1 Jan 1970 00:00:00 UTC.

A relative date can be specified by supplying a negative value; this is taken as the number of days before today. For example, -1 represents yesterday.

An alternative time zone can be specified if required, so that dates in (say) Pacific-time can be entered. This is achieved through the attrs attribute of the parameter which should contain two values separated with semicolons (;) or colons (:) as follows:

  1. The offset (in minutes) from UTC on 21 December (for example. -480 for Pacific time)
  2. The difference in this offset on 21 June due to DST corrections (for example, 60 for Pacific time)

A date parameter to enter times in Pacific time would look like this:

<parameter name="pacific" type="date" label="Pacific Date:" attrs="-480;60" argpos="1"/>

Note: This technique has been adopted because there is no agreed standard for naming time zones. These two values can be used by the iConsole to establish the likely time zone so that the relevant parameters can be used (for example, DST dates). This is accurate most of the time but there are one or two time zones that have identical values, but differing DST dates so absolute accuracy cannot be guaranteed.

The value attribute which is passed to the stored procedure will be UTC but the report_value attribute will contain the uncorrected time for the time zone. A report may then format the report_value (without local conversion) to display the time in the required time zone.