cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

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