cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Java Neo4j 3.5.1 - Loading Dates converts into String

MalteR
Node Link

Dear sirs or madams,

while loading plain dates with spring-data-neo4j formatted dates get converted into String while loading, please find below the code used for conversion, I was trying with a converter class and without following the the link:
forumlink

Blockquote

return value.toInstant()
       .atZone(ZoneId.systemDefault())
       .toLocalDate();

Blockquote

match(n:PERSON) where n.source = 'MANUALLY CREATED' return n.name,n.birthDate,apoc.meta.type(n.birthDate);
results in 
---------------------------------------------------------------------------
|n.name                                     |n.birthDate   |apoc.meta.type(n.birthDate)|
|-----------------------------------------|-----------------|--------------|
|"MAXIMILIAN MUSTERFRAU"|"2020-06-01"|"STRING"|
|"MAX MUSTERFRAN             "|"2018-10-02"|"STRING"|

Driver Version:

 <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-ogm-bolt-driver</artifactId>
            <version>3.2.8</version>
 </dependency>

Is there any chance to get the data into the database as dates as expected.

Any help is appreciated.
Thanks in advance.
Malte R

1 ACCEPTED SOLUTION

Hello @MalteR, nice to meet you.
I didn't use spring in the last year but I think that probably you've to try this solution from @gerrit.meier.

Check if your using correctly native types, please.
If that is operative and not work as expected, I will help you in other way (I've to create a little test before, so I'll need some hours and tomorrow I'll be a lot busy, so I'll try in weekend).

View solution in original post

4 REPLIES 4

Hello @MalteR, nice to meet you.
I didn't use spring in the last year but I think that probably you've to try this solution from @gerrit.meier.

Check if your using correctly native types, please.
If that is operative and not work as expected, I will help you in other way (I've to create a little test before, so I'll need some hours and tomorrow I'll be a lot busy, so I'll try in weekend).

MalteR
Node Link

Hi @Tobia.Moretti

Thank you very much for your effort at such a late time (at least in my timezone)
I will try it out accordingly...

I will give feedback if it worked out.

Cheers,
MalteR

MalteR
Node Link

Hi @Tobia.Moretti

it was perfectly worked out.
Thank you very much.

Cheers,
MalteR

Nice to hear that @MalteR!

If you'll need other help, I'll try to support you!

Bye,
Tobia