Reputation: 1206
Does neo4j natively support data format for node properties? like for example url links (clickable), numbers (integer, float..), date (YYYY/MM/DD).
Or we need to programmatically convert property string to whatever format we need?
Upvotes: 2
Views: 858
Reputation: 39915
Property values in Neo4j could be either Java primitive types (float, double, int, boolean, byte,... ), Strings or array of both. Date objects as property values are not supported.
There are two ways to deal with days:
Store the date as msec since epoc, aka new Date().getTime()
(in java)
long
Store the date as a string using e.g. SimpleDateFormatter
Personally I tend to prefer the first one.
In case you need to store time + timezone, you can have two properties. One for the date in msecs based on UTC, another one for the timezone.
Upvotes: 4