14.03.2014 Views

Download Jmp User Guide

Download Jmp User Guide

Download Jmp User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

488 Formula Functions Reference Appendix C<br />

Date Time Functions<br />

Date Time Functions<br />

See the JMP Scripting <strong>Guide</strong> for details about syntax.<br />

In Minutes, In Hours, In Days, In Weeks, In Years<br />

Converts from the units of the function name to the equivalent number of seconds for the argument.<br />

The argument must be a number or numeric expression. For example, In Minutes(2) yields 120, and In<br />

Years(1) yields 31,557,600 (60 seconds * 60 minutes * 24 hours * 365.25 days).<br />

Date DMY, Date MDY<br />

Accepts numeric expressions for day, month, and year and return the associated JMP date. For example,<br />

Date DMY (20, 3, 1991) and Date MDY(3, 20, 1991) evaluate to 2,752,272,000.<br />

Today<br />

Returns the number of seconds between January 1, 1904 and the current date. For example, at<br />

midnight on March 20, 1991 (a Wednesday), the Today function returns 2752272000 (2,752,272,000<br />

seconds) and continues counting. If you evaluate the Today function later in the day, it reflects the<br />

additional seconds.<br />

Day, Month, Year<br />

Returns the day of the month, the month (as a number from 1 to 12), and a four-digit year,<br />

respectively. The argument for these functions is interpreted as a JMP date. For example, on March 20,<br />

1991:<br />

• Day(2752272000) returns the number 20.<br />

• Month(2752272000) returns the number 3.<br />

• Year(2752272000) returns the number 1991.<br />

Hour, Minute, Second<br />

Returns the hour, the minute, and the seconds of a date-time value, respectively. The argument for<br />

these functions is interpreted as a JMP date. For example, on March 20, 1991:<br />

• Day(2752572649) returns the number 11.<br />

• Month(2752572649) returns the number 30.<br />

• Year(2752572649) returns the number 49.<br />

Day of Week, Day of Year, Week of Year, Time of Day<br />

The argument for these functions is a JMP date. Day Of Week returns a number from 1 to 7, where 1<br />

represents Sunday. Day Of Year returns the number of days from the beginning of the year. Week Of<br />

Year returns a number from 1 to 52. Time Of Day returns a number from 0 to 86399 (time of day in<br />

seconds). For example, on Wednesday, March 20, 1991:<br />

• Day Of Week(2752272000) returns the number 4.<br />

• Day Of Year(2752272000) returns the number 79.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!