Steve
Steve

Reputation: 21

How to add minutes to a date time value in orientdb

I want to add 5 minutes to a date time value and update the field.

like below. checkintime is a date time type. How do I do it in orientdb?

update employee set checkintime=sysdate()+5 return after

Upvotes: 1

Views: 331

Answers (1)

Alessandro Rota
Alessandro Rota

Reputation: 3570

You could also use

update employee set checkintime=sum(sysdate().asLong(),300000).asDate()

UPDATE

I use this code and it works for me

create class employee extends v
create vertex employee set checkintime=sum(sysdate().asLong(),300000).asDate(), checkoldtime=sysdate()

enter image description here

Hope it helps.

Upvotes: 1

Related Questions