NAV Table reading a SQL View

MarkD33
Member Posts: 25
We are experiencing a really odd situation with a SQL View on an intergration project.
Here's the background.
Billing records are written to in interface table in SQL. There's a view in the NAV database that reads the interface table. Then, there's a table in NAV that reads the SQL view. A report runs in NAV that reads the NAV table of the SQL view to pull data from the interface table to create Sales Invoices.
The process runs great, however, there's something weird occurring with one of the dates the client needs on the invoice. When the sales invoice is created, the date is consistently one day less than the date in the source interface table.
When I open up the interface table in SQL and look at the date column, the date = 6/21/07 12:00:00 AM
When I open up the view of the interface table in SQL and look at the date column, the date = 6/21/07 12:00:00 AM
When I open up the NAV table of the SQL view and look at the date column, the date = 6/20/07 7:00:00 PM.
For some very strange reason, the NAV table consistently subtracts 5 hours from the date in the SQL view. Thus, when the import runs, the date is off on the invoices by one day.
Any thoughts on why this could be occurring? I checked system times on the client's servers thinking that maybe an incorrect time zone could be causing the problem, but that's not the case.
Mark
Here's the background.
Billing records are written to in interface table in SQL. There's a view in the NAV database that reads the interface table. Then, there's a table in NAV that reads the SQL view. A report runs in NAV that reads the NAV table of the SQL view to pull data from the interface table to create Sales Invoices.
The process runs great, however, there's something weird occurring with one of the dates the client needs on the invoice. When the sales invoice is created, the date is consistently one day less than the date in the source interface table.
When I open up the interface table in SQL and look at the date column, the date = 6/21/07 12:00:00 AM
When I open up the view of the interface table in SQL and look at the date column, the date = 6/21/07 12:00:00 AM
When I open up the NAV table of the SQL view and look at the date column, the date = 6/20/07 7:00:00 PM.
For some very strange reason, the NAV table consistently subtracts 5 hours from the date in the SQL view. Thus, when the import runs, the date is off on the invoices by one day.
Any thoughts on why this could be occurring? I checked system times on the client's servers thinking that maybe an incorrect time zone could be causing the problem, but that's not the case.
Mark
0
Comments
-
Hello
Navision stores datetime on sql at UTC time. I would suggest changing the View and add something to change the date to UTC. I believe there is a getUTC function that will do the translation.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