You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I define a Vertex type person with the following sql-statements:
"alter database dateformat \"dd MM yyyy GG\"",
"alter database datetimeformat \"dd MM yyyy GG HH:mm:ss\"",
"create vertex type Person if not exists",
"create property Person.name if not exists String (mandatory true, notnull true)",
"create index if not exists on Person (name) unique",
"create property Person.dateOfBirth if not exists Date",
"create property Person.dateOfDeath if not exists Date"
Then I create a Vertex of type Person using the http-api:
{"language":"sql","command":"insert into Person content {\"name\":\"Chlodwig\",\"dateOfBirth\":\"01 01 0001 BC\",\"dateOfDeath\":\"01 01 0001 AD\",\"@type\":\"Person\",\"@cat\":null,\"@rid\":null}","params":{},"serializer":"record"}
The response shows the newly created Person as
{"user":"root","version":"23.7.1 (build 3213507e324358b3d1af59654e8c3f02f9c894ad/1709289154602/23.7.1)","serverName":"ArcadeDB_0","result":[{"@rid":"#12:0","@type":"Person","@cat":"v","dateOfDeath":"01 01 0001 AD 00:00:00","name":"Chlodwig","dateOfBirth":"01 01 0001 BC 00:00:00"}]}
The date is formatted as datetime. Why is this?
The problem is that on the client side I store the dates as LocalDates, not as LocalDateTimes, so that the deserialization of the returned values failed. Can this somehow be changed, so that the format of the returned date doesn't use the datetime pattern?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I define a Vertex type person with the following sql-statements:
Then I create a Vertex of type Person using the http-api:
The response shows the newly created Person as
The date is formatted as datetime. Why is this?
The problem is that on the client side I store the dates as LocalDates, not as LocalDateTimes, so that the deserialization of the returned values failed. Can this somehow be changed, so that the format of the returned date doesn't use the datetime pattern?
Beta Was this translation helpful? Give feedback.
All reactions