Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function converts a date value in a certain time zone and a certain language to a text.


Code Block
languagebash
titleSyntax
linenumberstrue
dateToString(timestamp, timeZone, language) #Output: Text


UI Expand
titleExamples


Parser ExpressionDescription


Code Block
languagebash
linenumberstrue
%{dateToString({issue.created}, RUN_AS_LOCAL, RUN_AS_LANG)}


This example will take the timestamp (date-time in milliseconds) and translates it to a user friendly text, displayed in the entered language's format.

This example might return:

18/May/20


Code Block
languagebash
linenumberstrue
%{dateToString({issue.created}, "Europe/Berlin", "de")}


With a different server language (e.g. German) the output differs.

This example might return:

18/Mai/20



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
timestamp

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).
timeZone

Status
subtletrue
titleTEXT

The time zone used for the calculation. 

language

Status
subtletrue
titleTEXT

The language used for the conversion. 


UI Text Box
typetip

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. 

If you want to convert a text into a date you might want to have a look at the function stringToDate().



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_datetostring" and space = currentSpace()


Page properties
hiddentrue


Short description
Converts any given date to a text.
Output

Status
subtletrue
titletext

Label

Status
colourRed
titlestaff pick