JSON date and date time format

648 views
Skip to first unread message

Luca Garulli

unread,
Jul 8, 2013, 7:27:17 AM7/8/13
to orient-database
Hi all,
today OrientDB parses JSON expecting the DATE and DATE-TIME properties to be in form of Long and ISO8601 (Example: 2012-04-23T18:25:43.511Z).

Now I'm changing it to support the date and date-time formats specified in database.

WDYT? Since JSON hasn't a date format are there any drawbacks on this?

Lvc@

Luca Garulli

unread,
Jul 8, 2013, 12:08:14 PM7/8/13
to orient-database
I've committed in "develop" branch (orientdb 1.5.0-SNAPSHOT) such news:
  • JSON exporter supports the new formatting parameter "dateAsLong". If enabled dates and date-times properties are exported as LONG. This speeds up also the export/import processes
  • If schema-full OrientDB HTTP layer is able to automatic parse formatted dates according to the database's configuration. So you can create a property as "1976-10-26" of type Date and "1976-10-26 07:30:00" of type Date time. No milliseconds are configured in datetime format, but you can execute an "alter database datetime "yyyy-MM-dd hh:MM:ss.SSS"
Lvc@

Reply all
Reply to author
Forward
0 new messages