Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Interval Date

Something is wrong with this expression, but can not figure out. Can you help me?

Only({$<Local={'Vila Recreio','Ponte Preta','Imbariê'},hora={">=$(=hora)<$(=hora + Time('00:40', 'hh:mm'))"}>}hora)

The expression should consider the date is between "hour" and hour + 40 minutes.

example:


My table:


Local Sentido Placa dataHora
Vila RecreioRio de JaneiroLLS000010/08/2013 08:30
Ponte PretaRio de JaneiroLLS000010/08/2013 08:42
PiabetáRio de JaneiroLLS000010/08/2013 11:16
Ponte PretaRio de JaneiroLLS000010/08/2013 11:26
Ponte PretaRio de JaneiroLLS000010/08/2013 12:59



Table of expression:


Data Sentido Placa Entrada Saída
10/08/2013Rio de JaneiroLLS0000Piabetá - 11:16    ?
5 Replies
vikasmahajan

Hiii

Please Find attachment.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Hello! Sorry but I need a solution using Expression. Anyway thanks for listening.

tresesco
MVP
MVP

The issue is with the format i guess. You are trying to add minutes to hours. You have to be careful about the format of the hour field. Working on the below part of your expression should resolve your issue.


hora + Time('00:40', 'hh:mm')

Not applicable
Author

Thank you for your attention, but what is wrong? I can not understand.

tresesco
MVP
MVP

What i wanted to mean is, please check if the output of hora + Time('00:40', 'hh:mm') is of similar format as in hora field or not.

Edit: One more point, you are using Only() function which will return '-' (null) if there is more than one values. Do you really want the output to be so? If not, you might want to use Concat() function instead.