On this page
All date-time values are numeric values representing the number of milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
JWT offers various ways of displaying or calculating date-time values, such as JWT calculated number fields.
General information
Time values can be manipulated and might depend on certain factors. These are listed below.
Time Macros
While the number of milliseconds might be useful in some cases, usually you want to retrieve values that are more readable (e.g. when being used in calculated fields).
Macros are aliases for fixed values. They are often used to convert milliseconds to a more accessible value.
Time zones
Fields of type date and date-time contain a numeric value with the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
The number that will be returned by any function using a date or date-time timestamp depends on a time zone.
Languages
When dealing with times and time zones sometimes you need to convert them to text. The text returned depends on the selected language.
Available functions
Function | Short description | Output | Label |
---|---|---|---|
addDays() | Adds or subtracts days to or from any given date. | NUMBER | |
addDaysSkippingWeekends() | Adds or subtracts natural days (or working days) to or from any given date. | NUMBER | STAFF PICK |
addMonths() | Adds or subtracts months to from any given date. | NUMBER | |
addTime() | Adds or subtracts days to or from any given timestamp based on a JWT calendar specification. | NUMBER | |
addTimeSkippingWeekends() | Adds or subtracts time to or from any given date. | NUMBER | |
addYears() | Adds or subtracts years to or from any given date. | NUMBER | |
datePart() | Returns the date part of any given timestamp. | NUMBER | STAFF PICK |
dateTime() | Creates a timestamp based on input values. | NUMBER | |
dateTimeToString() | Returns the timestamp of any given date in text form. | TEXT | STAFF PICK |
dateToString() | Returns the timestamp of a date part of any given date in text form. | TEXT | STAFF PICK |
dayOfTheMonth() | Returns the day of the month of any given timestamp. | NUMBER | |
dayOfTheWeek() | Returns the day of the week of any given timestamp. | NUMBER | |
dayOfTheWeekToString() | Returns the day of the week of any given timestamp in text form. | TEXT | |
dayOfTheYear() | Returns the day of the year of any given timestamp. | NUMBER | |
daysInTheMonth() | Returns the number of days in a month of any given timestamp. | NUMBER | |
fieldChangeTimes() | Returns the timestamps of when a field has changed satisfying a certain condition. | NUMBER LIST | |
formatDuration() | Returns a duration in text form. | TEXT | |
formatWorkDuration() | Returns a calculated duration using the workday and workweek defined at time tracking configuration. | TEXT | |
hour() | Returns the hour part of any given timestamp. | NUMBER | |
lastDayOfTheMonth() | Returns the last day of the month of a given timestamp. | NUMBER | |
lastFieldChangeTime() | Returns the timestamp of the most recent value change of any given field. | NUMBER | STAFF PICK |
minute() | Returns the minutes part of a given timestamp. | NUMBER | |
month() | Returns the month part of a given timestamp. | NUMBER | |
monthToString() | Returns the name of the month for a given timestamp. | TEXT | |
nextDayOfTheWeek() | Returns a timestamp for the next occurence of any given day. | NUMBER | |
nextTime() | Returns the next possible timestamp based on a JWT calendar specification. | NUMBER | |
second() | Returns the second part of any given timestamp. | NUMBER | |
shortFormatDuration() | Returns a duration in short text form. | TEXT | |
shortFormatWorkDuration() | Returns a calculated duration using the workday and workweek defined at time tracking configuration in a comprehensive form. | TEXT | |
stringToDate() | Converts a text into a date. | NUMBER | |
subtractDatesSkippingWeekends() | Subtracts two timestamps ignoring the weekends. | NUMBER | |
timeDifference() | Subtracts two timestamps based on a JWT calendar specification. | NUMBER | |
timeInStatus() | Returns the time the current issue has remained in a specific status. | NUMBER | STAFF PICK |
timeInValue() | Returns the time an issue field has had a specific value. | NUMBER | STAFF PICK |
timeLogged() | Returns the sum of all the time logged on issues. | NUMBER | |
timePart() | Returns the time part of any given date. | NUMBER | |
timeZone() | Returns a time zone. | TIME ZONE | |
weekOfTheYear() | Returns the week of a year. | NUMBER | |
withinCalendar() | Checks whether a timestamp falls into a time frame defined in a JWT calendar specification. | BOOLEAN | STAFF PICK |
year() | Returns the year part of a timestamp. | NUMBER |
If you still have questions, feel free to refer to our support team.