How to get previous date from a date

Hello there,
I am working with Neo4j dates, I want to get previous date from a date for example if "2019-01-01" is current date then i want "2018-12-31" as previous date.

Is there any way to get the previous date of a date in Neo4j using cypher?
Thanks in advance.

RETURN date('2019-01-01')- duration({days: 1}) as previousDate

╒══════════════╕
│"previousDate"│
╞══════════════╡
│"2018-12-31"  │
└──────────────┘
3 Likes

Thanks Paul, it worked :smile: