Comparison less than

I am working on an app that will calculate age with two dates. The comparison instruction lees than < is taking exactly the opposite route to the expected route. in the pic curr-day minus d-input1 is producing a result greater than 30. what is wrong. I have spent so much time trying to get the app to work properly. I have separated the starting block here. What is wron


g?

1 Like

I don’t think you can compare date text strings using mathematical symbols. Most likely, you need to use an API to determine which date comes first.

The < or > symbols will evaluate text alphabetically.

Thank you for quick response.

im just a beginner, but i think you can use “seconds since 1970” block for each date… difference between those 2 will get you age in seconds… than get year, month, day from seconds … :thinking:

1 Like

I tried this and it works correctly.

You need to convert the text label to number by multiplying it by 1 or adding 0 to it and the comparison will yield correct results