# < (less than) in CQL: syntax and examples

URL: https://goingstellar.ro/reference/cql/less-than-operator/

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

- `field`: created or lastModified.
- `value`: A 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 2026-11-29.

```
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 2026-11-29.

```
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 2026-11-29.

```
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 2026-11-29.

```
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 2026-11-29.

## 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).

## Related

- [<=](https://goingstellar.ro/reference/cql/less-than-equals-operator/)
- [>](https://goingstellar.ro/reference/cql/greater-than-operator/)
- [lastmodified](https://goingstellar.ro/reference/cql/lastmodified-field/)
- [startOfYear()](https://goingstellar.ro/reference/cql/startofyear/)
- [now()](https://goingstellar.ro/reference/cql/now/)
- [ORDER BY](https://goingstellar.ro/reference/cql/order-by/)

## Sources

- [CQL operators (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-operators/)
- [CQL fields (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-fields/)

