cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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") ),

 

Recommended Articles