14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B Formula Functions Reference 435<br />

Date Time Functions<br />

Today<br />

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

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

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

Day, Month, Year,<br />

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

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

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

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

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

Quarter<br />

Returns the annual quarter of a datetime value as an integer 1-4.<br />

Hour, Minute, Second<br />

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

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

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

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

• Second(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 <strong>JMP</strong> 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 Year<br />

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

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.<br />

• Week Of Year(2752272000) returns the number 12.<br />

• Time Of Day(2752272000) returns the number 0.<br />

Informat<br />

The argument for the Informat function is a date character string. For example, Informat("03/20/1991")<br />

returns the appropriate <strong>JMP</strong> date value, 2752272000. <strong>JMP</strong> can read all the date formats except for Abbrev<br />

Date and Long Date.

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

Saved successfully!

Ooh no, something went wrong!