Timestamp issue

I’m trying to get all items newer then the current systemtime. An agenda.
I do this by comparing unix timestamps.
The content_array is a list with csv values per line.
The 7th item in a line is a unix timestamp generated on a website.
If that timestamp is larger then the current system timestamp then that line should be stored.
Getting the system time isn’t the problem.
Getting the timestamp isn’t a problem.

Getting these two values in a “is larger then” statement results in 1 empty value.
If i display the timestamp inside an agenda item, for instance changing the last item nr to 7 it works perfectly.

Why does it NOT work in a mathematical statement?

2020-01-14 18_04_59-Window

Can you follow the annotations I marked in this picture?

Oops… :wink: But it’s just a minor issue. Not the cause or solution.

When I ask for the 2 values like this all works fine. I get both timestamps in my output. When i use the values in the larger than statement I get one empty value

2020-01-14 18_19_54-Window

use this extension for time compare. by @krish.jha

Thnx. That suggest the standard clock is buggy?
Why can’t I compare 2 unix timestamps? Displaying them independently works fine

not at all, there is always a correct way to use things, like 2+2=4 is possible with math blocks but two plus two are not accepted in that, so always you need a correct way to use things.

Hmmm, I don’t get that one. What is not accepted? I don’t understand the problem.

When I get the value from the list inside a “larger then” math block it states it’s an empty string. Why? When i display the same select list item on screen all works fine.

Is it an integer / string thing?

If you show us the output of this block, then we can help you better.

I can’t get that value in designmode by clciking “Do it”. But I can get them another way, from the app’s output. I’ve written the output next to it. In this case the “select list item index 7” works fine.

When I put the “select list item index 7” in the if/then statement, the string is empty. Please see below

2020-01-16 15_30_58-Window

1 Like

you might want to provide the Do it result of the global variable content_array then…
also you could check the result of the 7th item of each of the sublists to find out the issue…


1 Like

Thnx. There’s no way to get that variable. Nevermind.
You suggested that there’s something wrong with that variable. That the string was just empty, as Kodular reported.

So I added a check to see if it is a number. That’s the trick! Thank you for much for the suggestions. Problem solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.