| 1 |
UNWIND [ |
| 2 |
{ title: "Cypher Basics I", |
| 3 |
created: datetime("2019-06-01T18:40:32.142+0100"), |
| 4 |
datePublished: date("2019-06-01"), |
| 5 |
readingTime: {minutes: 2, seconds: 15} }, |
| 6 |
{ title: "Cypher Basics II", |
| 7 |
created: datetime("2019-06-02T10:23:32.122+0100"), |
| 8 |
datePublished: date("2019-06-02"), |
| 9 |
readingTime: {minutes: 2, seconds: 30} }, |
| 10 |
{ title: "Dates, Datetimes, and Durations in Neo4j", |
| 11 |
created: datetime(), |
| 12 |
datePublished: date(), |
| 13 |
readingTime: {minutes: 3, seconds: 30} } |
| 14 |
] AS articleProperties |
| 15 |
|
| 16 |
CREATE (article:Article {title: articleProperties.title}) |
| 17 |
SET article.created = articleProperties.created, |
| 18 |
article.datePublished = articleProperties.datePublished, |
| 19 |
article.readingTime = duration(articleProperties.readingTime) |
| 20 |
|
| 21 |
// https://neo4j.com/developer/cypher/dates-datetimes-durations/ |
| 22 |
|