The timeline column contains a range of dates. This is useful should your item(s) require more than a single date to be stored. Our API fully supports the timeline column, so you can filter, read, update, and clear it via the API.

Filtering the timeline column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the timeline column's supported operators, compare values, and compare attributes.

OperatorsCompare valuesCompare attributes
any_of"CURRENT", "DUE_TODAY", "FUTURE_TIMELINE", "PAST_TIMELINE", "DONE_ON_TIME", "OVERDUE", "DONE_OVERDUE", "MILESTONE", "$$$blank$$$"
not_any_of"CURRENT", "DUE_TODAY", "FUTURE_TIMELINE", "PAST_TIMELINE", "DONE_ON_TIME", "OVERDUE", "DONE_OVERDUE", "MILESTONE", "$$$blank$$$"
is_emptynull
is_not_emptynull
equals"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"
greater_than"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"
greater_than_or_equals"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"
lower_than"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"
lower_than_or_equal"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"
between"TODAY", "TOMORROW", "YESTERDAY", "THIS_WEEK", "ONE_WEEK_AGO", "ONE_WEEK_FROM_NOW", "THIS_MONTH", "ONE_MONTH_AGO", "ONE_MONTH_FROM_NOW", "PAST_DATETIME", "FUTURE_DATETIME", "UPCOMING", "OVERDUE", "DONE_ON_TIME", "DONE_OVERDUE", "EXACT""START_DATE", "END_DATE"

The following example returns all items on the specified board with a timeline column start date of the current week or earlier.

query {
  boards (ids: 1234567890) {
    items_page (query_params: {rules: [{column_id: "timeline", compare_value:"THIS_WEEK" , compare_attribute: "START_DATE", operator:greater_than_or_equals}]}) {
      items {
        id
      }
    }
  }
}

👍

Pro tip

items_page is only available in API version 2023-10 for now.

Reading the timeline column

You can query the timeline column using the column_values object. The object has different fields based on which API version you are using. Column values v2 fields will be available in API versions 2023-10 and later, while column values v1 fields are only supported in versions 2023-07 and 2023-04.

Column values v2

The column_values object enables you to return column-specific subfields by sending a fragment in your query. Values for the timeline column are of the TimelineValue type.

👍

Pro tip

column_values v2 fields are only available in API version 2023-10.

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on TimelineValue {
        from
        to
      }
    }
  }
}

Fields

FieldDescription
column Column!The column the value belongs to.
from DateThe timeline's start date.
id ID!The column's unique identifier.
text StringThe timeline's date range in YYYY-MM-DD format.
to DateThe timeline's end date.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.
visualization_string StringThe timeline's visualization type.

Column values v1

You can return the data in a timeline column in two different formats when you query by column values. The text field will return the timeline as a simple string. The value field will return metadata about the column as a JSON string.

🚧

Removing column values v1 support

column_values v1 fields will no longer be supported in API versions 2023-10 and later.

{
  "text": "2022-07-22 - 2022-08-14",
  "value": "{\"to\":\"2022-08-14\",\"from\":\"2022-07-22\",\"changed_at\":\"2022-07-21T12:00:00.000Z\"}"
}

Updating the timeline column

You can update a timeline column using the change_multiple_column_values mutation and passing a JSON string in the column_values argument. Simple string updates are not supported.

JSON

To update a timeline column using JSON, send the start and end dates in a YYYY-MM-DD format. The start date is “from” and the end date is “to”. Check out this mutation in action in our Postman library or follow along with these code samples!

mutation {
  change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"timeline\" : {\"from\" : \"2019-06-03\", \"to\" : \"2019-06-07\"}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    variables : JSON.stringify({
      myBoardId: 1234567890,
      myItemId: 9876543210,
      myColumnValues: "{\"timeline\" : {\"from\" : \"2019-06-03\", \"to\": \"2019-06-07\"}}"
    })
  })
})

Clearing the timeline column

You can also clear a timeline column using the change_multiple_column_values mutation and passing null or an empty object in the column_values argument.

mutation {
  change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"timeline\" : null}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    variables : JSON.stringify({
      myBoardId: 1234567890,
      myItemId: 9876543210,
      myColumnValues: "{\"timeline\" : null}"
    })
  })
})

📘

Join our developer community!

We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎