Reputation: 21
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
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()
Hope it helps.
Upvotes: 1