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.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
texas_stats
Level II

Exclude Time Data

Hello,

 

I have a column that is in Date-Time format.  I would like to exclude rows where the time includes 04:00:00, but my script isn't working.  Any help is appreciated.

texas_stats_1-1717433396828.png

 

Script in the Exclude column:

If( Contains( Format(:DT, "hh:mm:ss"), "04:00:00"),
	1,
	0
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Exclude Time Data

You can check for the time of day

If(Time Of Day(:DT) == In Hours(4),
	1
,
	0
);

Few examples

Show(
	Time Of Day(03Jun2024:04:00:00) == In Hours(4), // 1
	Time Of Day(03Jun2024:04:10:00) == In Hours(4), // 0
	Time Of Day(03Jun2024:05:00:00) == In Hours(4) // 0
);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Exclude Time Data

You can check for the time of day

If(Time Of Day(:DT) == In Hours(4),
	1
,
	0
);

Few examples

Show(
	Time Of Day(03Jun2024:04:00:00) == In Hours(4), // 1
	Time Of Day(03Jun2024:04:10:00) == In Hours(4), // 0
	Time Of Day(03Jun2024:05:00:00) == In Hours(4) // 0
);
-Jarmo
texas_stats
Level II

Re: Exclude Time Data

Awesome!  Thanks for the quick response.

CalebRogers
Level I

Re: Exclude Time Data

Thanks for answering, you made my day.

Recommended Articles