Status
Tech review

Style guide




Short description

Returns a  with the date-time represented by string s

Output




Returns a  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.


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


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


Parameters used in this function

ParameterInput (data type)Description
<timestamp>

Parameter description.
timeZone

The time zone used for the calculation. 


<parameter>

Parameter description.


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. 



The function returns a




The function returns a  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.


stringToDate(string s, string date_time_pattern ) #Output: Number



Parser expressionDescription


stringToDate("2011.03.25 at 11:30:00", "yyyy.MM.dd 'at' HH:mm:ss"


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



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.



The function returns a




The function returns a  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.


stringToDate(string s, string date_time_pattern , string language , string country ) #Output: Number



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 representing a date-time value that can be used for setting a Date Time picker custom field.



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.

<parameter>

Parameter description.
<parameter>

Parameter description.



The function returns a