- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Working with dates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Working with dates
If your date column is a JMP date value, and lets assume the date's column name is "The Date", then creating a new formula column, formula is fairly simple
If(Year(:The Date) < 2012, 1, 2)
1 would be assigned for all rows where The Date is less than 2012 and a 2 will be assigned for 2012 and greater
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Working with dates
On the same topic, the set of data is rather skewed, with daily data from 2010 to 2020, and minute data for a specific day. In the graph builder - how would I be able to analyse the set of data for that specific day vs the rest? I tried to drag date into "group by x", but it doesnt seem to give me options to specifically group them. I can probably manually set a row state to these specific data, but I was wondering if there was a more direct way to work that out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Working with dates
First, I suggest you take some time to read about JMP date, time functions and formats. It really will help you with the kinds of things you are looking to do. So taking what you asked for your first question in your response, you can use the informat() function to specify any particular date or date time for evaluation. So taking my last format and making it more specific, it would be:
If( :The Date < informat("09/23/2012", "m/d/y" ), 1, 2 );
If you want it to be down to an hour, minute, second, you just have to specify it, along with the JMP format that is required to read it.
For your analysis of one day vs. all other days, I would simply create a new column or a new transformation using the following formula
If( informat("09/23/2012 23:59:59", "m//d/y h:m:s") < :The Date <
informat( "09/24/2012", "m/d/y"), 1, 2 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Working with dates
@txnelson has steered you correctly. Using dates, times, datetimes and durations in JMP has good information about these topics and will likely be useful for you.