cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • We’re improving the Learn JMP page, and want your feedback! Take the survey
Choose Language Hide Translation Bar
Françoise
Level V

date calculation

Hi,

 

In Excel, I use the date function to get the date (d/m/y) from the year and the day of year (ex.: =DATE(2025;1;32)  .

 

How can I get the same formula in JMP? 

 

regards

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: date calculation

Some combination of date functions most likely  JSL Syntax Reference > JSL Functions, Operators, and Messages > Date and Time Functions . For example

Date DMY(1, 1, 2025) + In Days(32 - 1)

or

Date Increment(Date DMY(1, 1, 2025), "day", 32 - 1, "start")
-Jarmo

View solution in original post

4 REPLIES 4

Re: date calculation

This function will return the date from the year and the day of the year.

 

Names Default To Here( 1 );
yd_date = Function( {year, day}, {default local},
	dat = Format( In Years( year - Year( 0 ) ) + In Days( day ), "d/m/y" );
	Return( dat )
);
the_date = yd_date( 2025, 75 );
//"16/03/2025"
jthi
Super User

Re: date calculation

Some combination of date functions most likely  JSL Syntax Reference > JSL Functions, Operators, and Messages > Date and Time Functions . For example

Date DMY(1, 1, 2025) + In Days(32 - 1)

or

Date Increment(Date DMY(1, 1, 2025), "day", 32 - 1, "start")
-Jarmo
Françoise
Level V

Re: date calculation

Hi,

 

thanks for your answers.

 

I use this formula: 

Date DMY(1, 1, 2025) + In Days(32 - 1)

thanks for all these informations.

 

regards

markschahl
Level V

Re: date calculation

There is a handy utility in this addin by @brady_brady : Special formula columns > Custom date formula writer

 

https://community.jmp.com/t5/JMP-Add-Ins/Data-Table-Tools-Add-in/ta-p/28582

Recommended Articles