Dates in cluase with codeless

i have a block in codeless for comparing time:

but i getting always clause error.
how can i say that if the date is more then 24hours since it create, it will return true.

the problem is that I want to see if the created event_items date is more then 24 in event
this is my algorithm but I don’t know how to look into events.
shell I check every date in the result that I got?

Hi zeev

Can you see the log message clause: {YOUR WHERE_CLAUSE} in your logs?

Thanks, Vlad

nope, it will explain me where I did wrong

Are there any log messages on RealTime logging screen when you create a new events_items object?

it’s black :frowning:

the page doesn’t retrieve old log messages, it just gets and keeps new messages, so the logging page must be opened, when your create a new object (through API not from Data Browser page)

I getting only there

M> on Dec 10 2018 22:22:13 GMT+0200 (IST) | SERVER_CODE | INFO | [29154] Building ServerCode Model for path (/var/lib/backendless/repo/12a3f742-27db-6e63-ffd9-2dafe48de600/files/servercode/CODELESS/haifa/PRODUCTION)

Mon Dec 10 2018 22:22:13 GMT+0200 (IST) | SERVER_CODE | INFO | [29154] ServerCode Model built in 15ms

Mon Dec 10 2018 22:22:13 GMT+0200 (IST) | SERVER_CODE | INFO | [29154] [7BA70D75-426C-BA47-FFD2-AD593F54F900] [INVOKE HANDLER] persistence.beforeCreate (events_items)

Mon Dec 10 2018 22:22:14 GMT+0200 (IST) | SERVER_CODE | INFO | [29154] hgfdf

Mon Dec 10 2018 22:22:14 GMT+0200 (IST) | SERVER_CODE | INFO | [29154] Processing finished in 46.260ms

don’t getting anything else

I event write to log, and I don’t see anything

Try to put all your logic into a try/catch block and log any errors you get (the ones in the catch block)

hi mark,

I made log a message, and didn’t got anything, strange
I used to get them before

I suspect there is an error somewhere in the logic before it gets to the first logging block. Adding a try/catch block would help you identify the error.

done as you requested
inserted it all into try catch block
still no print of the log
as the picture above

is the object created in the database?

events_item created in database
then it checks if it’s needed to create new item in events or make a relation to events_item

do you create a new object using code or in REST Console?

new object, I can not make it in rest console

any idea? my all system is now not working as before
and I can’t see where is the problem