cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
UserID16644
Level V

Adding dates from columns

I have 3 dates that I wanted to add up in order to calculate the total number of days. Is there a way to do this? I just know the Date Difference ( ) function, but doesn't know if there is a function used in calculating the sum of dates from three different columns? 

4 REPLIES 4
Jeff_Perkinson
Community Manager Community Manager

Re: Adding dates from columns

Adding dates is an interesting concept.

Can you explain exactly what you mean?

I’m trying to guess what April 3, 2022 + May 22, 2022 would be.
-Jeff
UserID16644
Level V

Re: Adding dates from columns

Yes, so the sum would be how many days does April 3-May 22 have

txnelson
Super User

Re: Adding dates from columns

Here is a simple example:

Names Default To Here( 1 );
date1 = informat("4/3/2023");
date2 = informat("5/22/2023");
Date Difference(
	Date1,
	Date2,
	"Day",
	"start"
);
Jim
Jeff_Perkinson
Community Manager Community Manager

Re: Adding dates from columns

That helps. The Date Difference() function will tell you the number of days between two dates.

 

//:*/
start = 03Apr2022;
end = 22May2022;
days = Date Difference( start, end, "Day" );
/*:

49

You said something about a third date. How will that be used?

 

For more information you might find Using dates, times, datetimes and durations in JMP useful.

-Jeff