How to get Time diff

bala_7
Member Posts: 9
i am not able to get difference between Start Time & End Time both (Time Datatype) in Nav 2013 Report
DiffTime= "End Time"- "Start Time";
i have taken "DiffTime" also(Data type Time) in Global variable
i am getting below error
Microsoft Dynamics NAV Development Environment
Type conversion is not possible because 1 of the operators contains an invalid type.
Time := Integer
OK
please help me
DiffTime= "End Time"- "Start Time";
i have taken "DiffTime" also(Data type Time) in Global variable
i am getting below error
Microsoft Dynamics NAV Development Environment
Type conversion is not possible because 1 of the operators contains an invalid type.
Time := Integer
OK
please help me
0
Comments
-
Time := 0T - (235900T - 230000T);
Should work...0 -
Note that substracting times will give you an integer with time in ms.
IMHO saving this in a variable of data type Time doens't make sense as Time is actually a time instance. The same applies for dates. Substracting dates never will result in a new date.0 -
lvanvugt wrote:Substracting dates never will result in a new date.
???0 -
Mark Brummel wrote:lvanvugt wrote:Substracting dates never will result in a new date.
???
8)
Simple as it is: "November 4 (2013)" - "October 4 (2013)" wil not give me a date. It will will give me a number of days between these two dates.
Same applies to "times" (or better said: time instances): 14:00 - 13:24 will give the time (length) between these two time instances, being 36 minutes (or it's equivalent in whatever time dimension you use).0 -
I don't understand why you think a delta between dates or times cannot be used for a new date or time.
I do it all the time. I spend a lot of time in the logistics business.0 -
Hi Mark Brummel,
Thanks for reply,
DiffTime is Time Data type in NAV 2013 Report
DiffTime:=0T-("Service Header"."Finishing Time"-"Service Header"."Starting Time");
it is not working, am getting below error
Microsoft Dynamics NAV
The time is not valid.
OK
Pls help me0 -
Mark Brummel wrote:I don't understand why you think a delta between dates or times cannot be used for a new date or time.
I do it all the time. I spend a lot of time in the logistics business.0 -
Hi,
your term results in a negative value
try ... := 0T + (...)
Oli0 -
Hi OKl,
Thanks for reply
Time1:= 0T + (031000T - 030000T);
MESSAGE('%1',Time1);
its not working ,am getting same error i.e time is not valid
please help me0 -
Time1 := "Service Header"."Finishing Time";
Time2 := "Service Header"."Starting Time";
Duration1 := Time1 - Time2;
MESSAGE('Duration: %1',Duration1);
Integer1 := Duration1;
MESSAGE('Milliseconds: %1',Integer1);0 -
Hi Duilkmeester,
Thanks for reply, its working fine but if put any filler like Posting Date its gives error message
i.e. The Date not valid
please help me0
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
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions