Discussions
Activity
Best Of...
Sign In
·
Register
Home
›
NAV/Navision Classic Client
Howdy, Stranger!
It looks like you're new here. Sign in or register to get started.
Sign In
Register
Quick Links
Categories
Recent Discussions
Activity
Best Of...
Unanswered
Categories
All Categories
73
General
73
Announcements
66.6K
Microsoft Dynamics NAV
18.7K
NAV Three Tier
38.4K
NAV/Navision Classic Client
3.6K
Navision Attain
2.4K
Navision Financials
115
Navision DOS
854
Navision e-Commerce
1K
NAV Tips & Tricks
772
NAV Dutch speaking only
615
NAV Courses, Exams & Certification
2K
Microsoft Dynamics-Other
1.5K
Dynamics AX
305
Dynamics CRM
109
Dynamics GP
10
Dynamics SL
1.5K
Other
993
SQL General
384
SQL Performance
34
SQL Tips & Tricks
34
Design Patterns (General & Best Practices)
Architectural Patterns
10
Design Patterns
5
Implementation Patterns
53
3rd Party Products, Services & Events
1.7K
General
1.1K
General Chat
1.6K
Website
79
Testing
1.2K
Download section
23
How Tos section
260
Feedback
12
NAV TechDays 2013 Sessions
13
NAV TechDays 2012 Sessions
About Round function
navuser1
Member
Posts:
1,329
2008-09-25
edited 2014-01-23
in
NAV/Navision Classic Client
Dear All,
Please share your knowledge.
How precision in round function works in Navision?
If precision=0.123, then how round function will work?
Now or Never
0
Comments
DaveT
Member
Posts:
1,039
2008-09-25
Hi,
The round function is different (but cool) from most other programming languages. It will round to the nearest of the value sent in the argument ( 0.123 in yor case ) so if you send 1 to round to 0.123 you will get 0.984 i.e. 0.123 * 8
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
navuser1
Member
Posts:
1,329
2008-09-25
Thanks,
Please tell me the logic.
NewNo=round(Number,Precision,Direction)
if Number=1.123, Precision=0.11, Direction='>', then NewNo=?
Now or Never
0
DaveT
Member
Posts:
1,039
2008-09-25
Hi,
It divides 1.123 by 0.11 = 10.20909
With no direction rounds to 10 * 0.11 = 1.1
with direction rounds to 11 * 0.11 = 1.21 i.e. round up to the next multiple of 0.11
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
navuser1
Member
Posts:
1,329
2008-09-25
Great!
Thank you very much for your reply.
Now or Never
0
DaveT
Member
Posts:
1,039
2008-09-25
Gald to help
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
IvonaK
Member
Posts:
115
2014-01-23
Hi to all,
How I can round number:1.5 to 2 and number:1.6 to 2.
I tried with
ROUND(ROUND(1.5,1.001,'='),1)
it works for number 1.6 but it doesn't work for number 1.5.
Thanks a lot,
0
mohana_cse06
Member
Posts:
5,504
2014-01-23
What do you want to do with 1.4 or 1.3?
If you want to make it to 2 then you use > instead of = in your expression..
Help on Round function is here
http://msdn.microsoft.com/en-us/library/dd301418.aspx
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
0
IvonaK
Member
Posts:
115
2014-01-23
I would like to round decimal number to integer so if floating part is >= the 0.5 to round up to the nearest value
for example if I have number
122.30 I would like to round to 122.00
122.50 I would like to round to 123.00
I tried with ROUND(DecimalNumber,1,'=');
and It works.
Thank a lot
0
Sign In
or
Register
to comment.
Comments
The round function is different (but cool) from most other programming languages. It will round to the nearest of the value sent in the argument ( 0.123 in yor case ) so if you send 1 to round to 0.123 you will get 0.984 i.e. 0.123 * 8
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Please tell me the logic.
NewNo=round(Number,Precision,Direction)
if Number=1.123, Precision=0.11, Direction='>', then NewNo=?
It divides 1.123 by 0.11 = 10.20909
With no direction rounds to 10 * 0.11 = 1.1
with direction rounds to 11 * 0.11 = 1.21 i.e. round up to the next multiple of 0.11
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Thank you very much for your reply.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
How I can round number:1.5 to 2 and number:1.6 to 2.
I tried with
ROUND(ROUND(1.5,1.001,'='),1)
it works for number 1.6 but it doesn't work for number 1.5.
Thanks a lot,
If you want to make it to 2 then you use > instead of = in your expression..
Help on Round function is here
http://msdn.microsoft.com/en-us/library/dd301418.aspx
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
for example if I have number
122.30 I would like to round to 122.00
122.50 I would like to round to 123.00
I tried with ROUND(DecimalNumber,1,'=');
and It works.
Thank a lot