Printing date/time

21 views
Skip to first unread message

Sean R

unread,
Sep 7, 2017, 5:27:01 PM9/7/17
to Neo4j
Greetings.!
Trying to print/return system date and timestamp. 

Following CYPHER gives me  a value of - 1504818368473

RETURN TIMESTAMP()

Not sure howto convert into mm/dd/yyyy 

I am using 3.2.2. - community edition.

Thanks

Michael Hunger

unread,
Sep 7, 2017, 5:29:53 PM9/7/17
to ne...@googlegroups.com
Use APOC: https://github.com/neo4j-contrib/neo4j-apoc-procedures

RETURN apoc.date.format(timstamp());

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean R

unread,
Sep 7, 2017, 5:43:37 PM9/7/17
to Neo4j
Thank you.

Somehow my format is not changing. Am I missing anything ?

1. RETURN apoc.date.format(timestamp(),'mm/yyyy/dd')

ans: "2017-09-07 21:36:24"

2. RETURN apoc.date.format(timestamp());

ans: "2017-09-07 21:40:19"

3. RETURN apoc.date.format(timestamp(),'[ms]','yyyy/mm/dd');

 ans:  "2017/42/07"  -- format is changed but its not correct.

Thanks




On Thursday, September 7, 2017 at 5:29:53 PM UTC-4, Michael Hunger wrote:
Use APOC: https://github.com/neo4j-contrib/neo4j-apoc-procedures

RETURN apoc.date.format(timstamp());
On Thu, Sep 7, 2017 at 11:27 PM, Sean R <chandr...@gmail.com> wrote:
Greetings.!
Trying to print/return system date and timestamp. 

Following CYPHER gives me  a value of - 1504818368473

RETURN TIMESTAMP()

Not sure howto convert into mm/dd/yyyy 

I am using 3.2.2. - community edition.

Thanks

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.

Michael Hunger

unread,
Sep 7, 2017, 5:50:30 PM9/7/17
to ne...@googlegroups.com
The last one is correct but without the []

Von meinem iPhone gesendet

Chandra R Matta

unread,
Sep 8, 2017, 8:38:52 AM9/8/17
to ne...@googlegroups.com
Hi Michael,

Still no luck.


RETURN apoc.date.format(timestamp(),'ms','mm/dd/yyyy');
ans:  "36/08/2017"

RETURN apoc.date.format(timestamp(),'s','mm/dd/yyyy');
"10/26/49657"

Thanks



To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/AFT2WKmwpUs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+unsubscribe@googlegroups.com.

Michael Hunger

unread,
Sep 9, 2017, 4:36:10 PM9/9/17
to ne...@googlegroups.com
 mm is minutes 
MM is months 

Von meinem iPhone gesendet
Reply all
Reply to author
Forward
0 new messages