Floor
Floor(x,digits, dateUnit)
Floor(x) Returns the largest number equal to or less than «x».
Note: The «digits» and «dateUnit» parameters are available only in Analytica 4.3 or later.
Floor(x,digits) returns the largest number with «digits» digits to the right of the decimal among all such numbers that are less than or equal to «x».
- Floor( 3.141592, 3 ) &rarr 3.141000
- Floor(-3.141592, 3 ) &rarr -3.142000
- Floor(-3, 2 ) &rarr -3.0000000
«digits» may be negative. In general, finds the largest multiple of 10-«digits» that is equal to or less than «x».
If you specify the optional «dateUnit» parameter, Floor rounds a date-time number downward to the beginning of the current year, quarter, month, day, hour, minute, second, or to the beginning of the current or preceding weekday. The «dateUnit» parameter must be one of the following values: 'Y', 'Q', 'M', 'WD', 'D', 'h', 'm', or 's'. Note that 'M' (Month) and 'm' (minute) are case sensitive. Alternatively, you can spell out the «dateUnit» using one of 'year', 'quarter', 'month', 'weekday', 'day', 'hour', 'minute', or 'second'.
- Floor( MakeDate(2010,8,8), dateUnit: 'Q') → 2010-Jul-1
- Floor( MakeDate(2010,8,8), dateUnit: 'WD') → Friday, 2010-Aug-6
- Floor( MakeDate(2010,8,8), dateUnit: 'Y') → 2010-Jan-1
Enable comment auto-refresher