Skip to main content

Hello, I am attempting to test if an input date exists between a date range - I'm struggling to find the correct syntax or transformers to do this (after 40 minutes of trying). Can anyone help?

Currently my input is to AttributeCreator the time for now - @DateTimeFormat(@DateTimeNow(),%T)

Then so far I have used a Tester to see if it was greater or less than two times e,g, >= @DateTimeFormat(09:00:00, %T) OR <= @DateTimeFormat(09:05:00, %T)

But predictably this doesn't work as it will always be greater or less than one or the other. I would like to use BETWEEN (if I was using SQL).

Is there an efficient way to do this in FME? Other than converting the time to a number (which would mean regex-ing the leading '0' up to midday) and then comparing numerical values in a (presumably) AttributeRangeFilter?

Apologies if I am missing something basic! Help very much appreciated 🙇‍♂️ 🇬🇧

If you use an AND instead of an OR in your Tester expression it should work.


If you use an AND instead of an OR in your Tester expression it should work.

Thank you - I think I tried AND before and it didn't work, but I didn't set the Left Value a second time - which is why it failed.

I thought it would be a simple answer! Thanks for your help!


Reply