You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Returns a  NUMBER with the date-time represented by string s. The numeric value returned corresponds to the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.

Valid input string formats are yyyy/MM/dd HH:mm, yyyy-MM-dd HH:mm, yyyy/MM/dd, yyyy-MM-dd,

Also formats relative to current time like in JQL queries: "w" (weeks), "d" (days), "h" (hours) or "m" (minutes), or format defined at system property jira.date.time.picker.java.format.

Syntax
stringToDate(string s, timeZone time_zone) #Output: Number
Examples

For a detailed example, check the following page : Validation based on a Date type Project Property

Additional information

Parameters used in this function

ParameterInput (data type)Description
<timestamp>

DATA TYPE

Parameter description.
timeZone

TIMEZONE

The time zone used for the calculation. 

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 

Output

The function returns a NUMBER


The function returns a NUMBER with the date-time represented by string s. Expected format of value at parameter "s" is defined by date_time_pattern string parameter. The numeric value returned corresponds to the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.

Syntax
stringToDate(string s, string date_time_pattern ) #Output: Number
Examples
Parser expressionDescription
stringToDate("2011.03.25 at 11:30:00", "yyyy.MM.dd 'at' HH:mm:ss"

The function returns a NUMBER representing a date-time value that can be used for setting a Date Time picker custom field.

Additional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>

DATA TYPE

Parameter description.
<parameter>

DATA TYPE

Parameter description.

Output
The function returns a NUMBER


The function returns a NUMBER with the date-time represented by string s. Expected format of value at parameter "s" is defined by date_time_pattern string parameter for a specific language (language code ISO 639-2 ) and country (country code ISO 3166 alpha-2 ). The numeric value returned corresponds to the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.

Syntax
stringToDate(string s, string date_time_pattern , string language , string country ) #Output: Number
Examples
Parser expressionDescription
stringToDate("Dec 7, 2016 2:10:25 AM PST", "MMM d, yyyy h:mm:ss a z", "eng", "US")

The function returns a NUMBER representing a date-time value that can be used for setting a Date Time picker custom field.

Additional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>

DATA TYPE

Parameter description.
<parameter>

DATA TYPE

Parameter description.

<parameter>

DATA TYPE

Parameter description.
<parameter>

DATA TYPE

Parameter description.
Output

The function returns a NUMBER