Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

This function returns the date part of any given timestamp.


Code Block
languagebash
titleSyntax
linenumberstrue
 datePart(timestamp, timeZone) #Output: Number 


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
datePart({issue.created}, LOCAL)



This example returns the issue creation date, e.g. March 25th, 2020 00:00 as a number in milliseconds.

UI Text Box
typeinfo

If the creation date was March 25th, 2020 23:15 the output would be March 25th, 2020 00:00 (in milliseconds).

The time part 23:15 will be removed from the timestamp and will be set to 00:00.




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
titletimezone

The time zone used for the calculation. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
title number
 representing a timestamp


UI Text Box
typetip

If you need the time part instead, you might want to have a look at the function timePart().



Use cases and examples

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


Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short descriptionReturns the date part of any given timestamp.
Output

Status
subtletrue
titlenumber

Label

Status
colourRed
titlestaff pick