cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
wendong
Level I

how to Local data filter with today's date

We are trying to filter the date by today's date.

original line of code is Where( :DateOnly == "2020/02/27" ),

I try to replace the date by Short Date(Today()) or "Short Date(Today())", "|| Short Date(Today())||'  ; nothing worked, anyone can help?

----------

Local Data Filter(
Width( 178 ),
Add Filter(
columns( :DateOnly, :Equipment ),
Where( :DateOnly == "||Short Date(Today())||" ),
Display(
:DateOnly,
Size( 172, 238 ),
Height( 238 )
),
Display(
:Equipment,
Size( 172, 51 ),
Height( 51 ),
"List Display"
)
)
),

1 ACCEPTED SOLUTION

Accepted Solutions
wendong
Level I

Re: how to Local data filter with today's date

Thanks Jim for saving my day. ( I just need to change your line of code at the end from the semi colon to comma, then it works out)

Where( :DateOnly == format(today(),"y/m/d") ),

 

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: how to Local data filter with today's date

  1. Apparently your :DateOnly column is of data type character.
  2. The function Short Date() returns the format of "mm/dd/yyyy" and you need "yyyy/mm/dd"
  3. The format "y/m/d" will return that value and if you use the Format() function it will return it as the character string you desire
Where( :DateOnly == format(today(),"y/m/d") );
Jim
wendong
Level I

Re: how to Local data filter with today's date

Thanks Jim for saving my day. ( I just need to change your line of code at the end from the semi colon to comma, then it works out)

Where( :DateOnly == format(today(),"y/m/d") ),