ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Math functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
From version 28, RoundDown is kept for backward compatibility. This function has been replaced with RoundFloor.
Returns:
  • the numeric value rounded down to the nearest integer.
  • the duration rounded down to the nearest interval.
  • the date and time rounded down to the nearest interval.
Example
ResRound = RoundFloor(-16.238167,2) // Returns -16.24
ResRound = RoundFloor(3.9) // Returns 3 (no decimal)
ResRound = RoundFloor(3.999,2) // Returns 3.99
ResRound = RoundFloor(1.9) // Returns 1
ResRound = RoundFloor(-1.9) // Returns -2
// Rounded Duration
ResRoundedDuration is Duration
ResRoundedDuration = RoundFloor(13 min, 5 min) // Returns10 min (0001000000)
// The duration is divided into 5-minute periods.
// The result is the start of the time range that contains 13 min.
// Rounded DateTime variable
dtMyDateTime is DateTime = "202211041524"
Trace("dtMyDateTime: " + dtMyDateTime)
Trace("RoundFloor: " + RoundFloor(dtMyDateTime, 7 min)) 
// Displays 20221104152400000

// The day is divided into 7-minute periods.
// In this example, the dtMyDateTime variable is rounded down to the nearest value
Syntax

Rounding a numeric value down Hide the details

<Result> = RoundFloor(<Numeric value> [, <Number of decimals>])
<Result>: Integer or real
Value rounded to the lower number.
<Numeric value>: Real or currency
Numeric value to round.
<Number of decimals>: Optional integer
Number of decimals to return. If this parameter is not specified, no decimal is returned.
Remarks
The decimal separator for real numbers is "." (point).
Business / UI classification: Neutral code
Component: wd290mat.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
COMO USAR ROUNDDOWN
Nessa aula de hoje

COMO USAR ROUNDDOWN


EDT_RESULTADO=EDT_a*EDT_b
EDT_RESULTADO1=Round(EDT_a*EDT_b,2)

EDT_RESULTADO2=RoundDown(EDT_a*EDT_b,2)

EDT_resultado_texto="sem round ["+EDT_RESULTADO+CR
EDT_resultado_texto+="Round ["+EDT_RESULTADO1+CR
EDT_resultado_texto+="RoundDown ["+EDT_RESULTADO2+CR

// BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/07/aula-1196-comandos-17-rounddown.html

https://www.youtube.com/watch?v=NQHfyvnBRQk


De matos
04 Jul. 2017

Last update: 02/27/2024

Send a report | Local help