13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase 4 Date, Time, and Money Data 757Date, Time, and Money DataSybase date and money data types are abstract data types. See your documentationon Transact-SQL <strong>for</strong> more in<strong>for</strong>mation about abstract data types.DATEDATE data is 4 bytes long and represents dates from January 1, 0001, toDecember 31, 9999.TIMETIME data is 4 byes long and represents times from 12:00:00 AM to 11:59:59:999PM.SMALLDATETIMESMALLDATETIME data is 4 bytes long and consists of one small integer thatrepresents the number of days after January 1, 1900, and one small integer thatrepresents the number of minutes past midnight. The date range is from January1, 1900, to December 31, 2079.DATETIMEDATETIME data has two 4-byte integers. The first integer represents the numberof days after January 1, 1900, and the second integer represents the number ofmilliseconds past midnight. Values can range from January 1, 1753, to December31, 9999.You must enter DATETIME values as quoted character strings in variousalphabetic or numeric <strong>for</strong>mats. You must enter time data in the prescribed order(hours, minutes, seconds, milliseconds, AM, am, PM, pm), and you must includeeither a colon or an AM/PM designator. Case is ignored, and spaces can beinserted anywhere within the value.When you input DATETIME values, the national language setting determineshow the date values are interpreted. You can change the default date order withthe SET DATEFORMAT statement. See your Transact-SQL documentation <strong>for</strong>more in<strong>for</strong>mation.You can use Sybase built-in date functions to per<strong>for</strong>m some arithmeticcalculations on DATETIME values.TIMESTAMP<strong>SAS</strong> uses TIMESTAMP data in UPDATE mode. If you select a column thatcontains TIMESTAMP data <strong>for</strong> input into <strong>SAS</strong>, values display in hexadecimal<strong>for</strong>mat.SMALLMONEYSMALLMONEY data is 4 bytes long and can range from –214,748.3648 to214,748.3647. When it is displayed, it is rounded up to two places.MONEYMONEY data is 8 bytes long and can range from –922,337,203,685,477.5808 to922,337,203,685,477.5807. You must include a dollar sign ($) be<strong>for</strong>e the MONEYvalue. For negative values, you must include the minus sign after the dollar sign.Commas are not allowed.MONEY values are accurate to a ten-thousandth of a monetary unit. However,when they are displayed, the dollar sign is omitted and MONEY values arerounded up to two places. A comma is inserted after every three digits.You can store values <strong>for</strong> currencies other than U.S. dollars, but no <strong>for</strong>m ofconversion is provided.

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

Saved successfully!

Ooh no, something went wrong!