Depends on your data and how it's produced. First off, SAS's precision is 2^53, aside from the floating point. However, DATETIME is a number in the billions usually (# of seconds since 1/1/1960 is about 1.7 billion), which is about 2^31. So you really have about 2^22 more precision available in the decimal; that works out to about microseconds in a datetime. (This is because SAS stores in a 64 bit floating point number 1 sign bit, 11 exponent bits, and 52 bits for the mantissa, which can store up to 2^53 accurately.) This is all assuming you're on an IEEE system, ie, Intel, Windows/Unix, etc. If you're on a mainframe it's a bit different. This example shows about how the precision works: data test; format dtval dtval_test DATETIME23.6; dtval=datetime(); do _pow = -1 to -15 by -1; dtval_test = dtval - 10**_pow; diff = dtval-dtval_test; put "Difference:" dtval= dtval_test= diff= 18.16 _pow=; end; run; It stops working (stops having a difference) at 10^-7, which would be tens of millions. That's where you completely lose precision, ie, SAS won't even consider a difference of 1x10-7 to be a difference. Before that, the difference seems good to about that spot: for 10^-1, diff is 0.0999999046 for example (this is for datetime when I ran this, actual difference may vary some). Further on that is approximately consistent; around the 7th or 8th digit it diverges from where it should be. The first six digits after the decimal are 'right', the seventh is often but not always right. This is all contingent on using datetimes approximately like this year's datetimes. If you are using time or datetime intervals, ie, values that are pretty small on the left side of the decimal, you can be much more precise. Basically consider 15 significant digits on either side of the decimal and you're okay. Nanoseconds in times should be fine for example (left has at most 5 digits, right can have 10 safely). If you're solely looking at intervals, and there isn't any left side of the decimal, you can have up to 39 digits after the decimal in theory according to the datetime format (though I don't highly recommend doing that). Reference: SAS(R) 9.2 Language Reference: Concepts, Second Edition
... View more