Going Stellar

Home/CQL reference

CQL operator

< (less than) in CQL: syntax and examples

The < operator keeps content whose date is earlier than the value. Use it with lastModified to find stale pages and with created to find old files. The value can be a date or a function such as startOfYear() or now("-12w").

Syntax

f
i
e
l
d
 
<
 
v
a
l
u
e

Arguments

ArgumentWhat it does
fieldcreated or lastModified.
valueA quoted date or date and time, or a date function with an optional offset.

Works with

  • Fields: Created, LastModified (the only fields the field reference lists for range operators)
  • Functions: now(), startOfDay(), startOfWeek(), startOfMonth(), startOfYear(), endOfDay(), endOfWeek(), endOfMonth(), endOfYear()
  • Not with: ancestor, content, creator, contributor, favourite, id, mention, owner, parent, watcher (Operator '<' is not supported), and text-type fields such as title, space, type, label (Could not parse cql)

Examples

lastmodified < startOfYear() and type = page

The docs example: pages nobody has edited since last year began.

Run on Confluence Cloud on .

lastmodified < "2026-11-01" AND type = page AND space = SD ORDER BY lastmodified ASC

A stale-page list for one space, oldest first, to decide what to archive.

Run on Confluence Cloud on .

lastmodified < now("-12w") AND type = page AND space = SD ORDER BY lastmodified ASC

Pages untouched for twelve weeks, with the rule moving forward every day.

Run on Confluence Cloud on .

type = attachment AND created < "2026-11-16" AND fileExtension = "svg"

Old SVG attachments, for example before a branding change on that date.

Run on Confluence Cloud on .

created < now("-1w") AND lastmodified >= now("-1w") AND type = page AND space = SD

Older pages that were edited this week, which separates revisions from new pages.

Run on Confluence Cloud on .

Pitfalls

  • A date-only value is the start of that day, so created < "2026-11-16" leaves out everything made on the 16th. To include that day use <= or move the bound to the next day (checked on Confluence Cloud, November 2026).
  • Add a time to cut inside a day: lastmodified < "2026/11/01 12:00" is accepted and keeps only edits before noon.
  • On fields without range support the error says so: "Operator '<' is not supported for field 'creator'. Supported operators are : =, !=, IN, NOT IN". On text-type fields such as type < page you get "Could not parse cql" instead.
  • filesize < 1000000 AND type = attachment is accepted too, although only date fields are listed in the docs (checked on Confluence Cloud, November 2026).

Sources

  1. CQL operators (Atlassian Developer, Confluence Cloud)
  2. CQL fields (Atlassian Developer, Confluence Cloud)

Markdown version · All CQL pages