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

Use like with function

Hi guys, stalwar1

If I want to search for every field that contains the A letter I would do :

where field like '*A*'

Now what if I wanted to search for everyfield containing today() ?

How to  that since :

where field like '*Today()*' does not work ; syntax error.


thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you want to replace Today() with today's date, you need to use dollar sign expansion:

Let vDate = Today(); // potential need to format using Date() to match your field values

...

LOAD

     FIELD

FROM ...

WHERE FIELD LIKE '*$(vDate)*';

edit:

Or maybe just this?

...

WHERE FIELD = Today();

View solution in original post

6 Replies
Chanty4u
MVP
MVP

try this

is today()  is value?

where wildmatch(fieldName,'*Today()*')


or

where wildmatch(fieldName,'Today()')

swuehl
MVP
MVP

Can you post a screenshot of the error message?

swuehl
MVP
MVP

If you want to replace Today() with today's date, you need to use dollar sign expansion:

Let vDate = Today(); // potential need to format using Date() to match your field values

...

LOAD

     FIELD

FROM ...

WHERE FIELD LIKE '*$(vDate)*';

edit:

Or maybe just this?

...

WHERE FIELD = Today();

OmarBenSalem
Author

When I created a variable :

let vToday= today()

and then in my condition I used this variable :

where field like '*$(vToday)*' it worked.

OmarBenSalem
Author

That won't work unless It's stored in a variable then we call the variable.

When I did that, It worked just fine

OmarBenSalem
Author

Yes, well seen ! I just did that and I worked like a charm !