0

I am trying to get an MVEL expression to work but am having probelms. I am tyring to determine if date defined as a property falls between two other dates.

props['ExistingStartDate'] >= props['current_period_start_date'] && props['ExistingStartDate'] <= props['current_period_end_date']

So in this case, my ExistingStartDate = 3/6/14, current_period_start_date = 3/3/14 and current_period_end_date = 3/16/14

I am expecting this to be true. I feel like there must be something wrong with my syntax. Any help would be appreciated!

LC_123
  • 63
  • 3
  • 9

1 Answers1

0

Use parentheses for each term for multiple conditions:

(props['ExistingStartDate'] >= props['current_period_start_date']) && (props['ExistingStartDate'] <= props['current_period_end_date'])

Also, the props references may not have the correct syntax depending on what type of Java object it is.