SQL Server 2005 - NAVISION TIME DATA TYPE

b2b_Vijay
Member Posts: 76
Hi All,
I am trying to insert Start Time and End Time which has Data Type as Time from Navision and when i open SQl Server 2005 Management Studio and try to view the records, it is stored as 1/01/1754 9:00:00 AM and 1/01/1754 12:00:00 AM respectively. If i try to change the year in SQL and open the form in Navision, the system throws a error message as below -
Microsoft Business Solutions-Navision
The Pay Time Sheet Journal Line table contains a Time field that uses invalid data for the date component of the DATETIME value:
Field: End Time
Value: 1854-01-01 00:00:00.000
OK
I see in SQL that there is no Time Datatype. SQL uses DateTime Datatype.
SQL Version
============
[Start Time] datetime Unchecked
[End Time] datetime Unchecked
Navision Version
=================================
Enabled Field No. Field Name Data Type
Yes 89 Start Time Time
Yes 90 End Time Time
==================================
Do we need to Hard code the date 1/01/1754 before the time, when inserting into SQL database through external interface and not from Navision.As if i use the Current date to insert along with the time, Navision form throws an error and does not open
Any advice would be highly appreciated.
Thanks
I am trying to insert Start Time and End Time which has Data Type as Time from Navision and when i open SQl Server 2005 Management Studio and try to view the records, it is stored as 1/01/1754 9:00:00 AM and 1/01/1754 12:00:00 AM respectively. If i try to change the year in SQL and open the form in Navision, the system throws a error message as below -
Microsoft Business Solutions-Navision
The Pay Time Sheet Journal Line table contains a Time field that uses invalid data for the date component of the DATETIME value:
Field: End Time
Value: 1854-01-01 00:00:00.000
OK
I see in SQL that there is no Time Datatype. SQL uses DateTime Datatype.
SQL Version
============
[Start Time] datetime Unchecked
[End Time] datetime Unchecked
Navision Version
=================================
Enabled Field No. Field Name Data Type
Yes 89 Start Time Time
Yes 90 End Time Time
==================================
Do we need to Hard code the date 1/01/1754 before the time, when inserting into SQL database through external interface and not from Navision.As if i use the Current date to insert along with the time, Navision form throws an error and does not open
Any advice would be highly appreciated.
Thanks
Regards,
Vijay
Vijay
0
Comments
-
SQL does NOT have a field "Time" or "Date". So both Navision datatypes are converted to SQL datetime with a certain structure (for time it is "1/01/1754" + the time). If you don't follow this structure you have a problem.
So it is NECESSARY to put "1/01/1754" + time in the SQL datetime field.
Another possibility is that in Navision you have a datetime-field instead of a date and a time field. In this case there shouldn't be a problem.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
If you choose to use DateTime fields be aware that the client timezone settings will impact the value displayed.
From Help:The biannual change to and from daylight saving time affects the way in which datetimes are displayed. For example, if you are located in central Europe, you are in the central European time zone and are using Central European Time (CET). During the winter the difference between CET and UTC is 1 hour. When you change to daylight saving time for the summer the difference is 2 hours.
This means that the local time representation of a UTC will vary depending on the time zone you are located in and whether you are using daylight saving time or not. Therefore, any datetimes that were entered during the winter will be converted and displayed differently after you have changed to daylight saving time for the summer. In other words, datetimes will not necessarily be displayed the same as when they were entered.There are no bugs - only undocumented features.0
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