Current Date in CODBC

nav123
Member Posts: 3
Hello,
Can anyone help me with this -
I am trying to transfer (export) data from navision to Sql server using DTS. I need to bring a few records that have a date filter - date < current date - 5 days.
eg. select * from job where "Last Midifed Date" < getDate() - 5 days
How to get the current date in codbc. and how to manipulate(add or subtract days) it.
I am using DTS and want to execute this sql query.
Any help will be greatly aprecaited.
Thanks
Can anyone help me with this -
I am trying to transfer (export) data from navision to Sql server using DTS. I need to bring a few records that have a date filter - date < current date - 5 days.
eg. select * from job where "Last Midifed Date" < getDate() - 5 days
How to get the current date in codbc. and how to manipulate(add or subtract days) it.
I am using DTS and want to execute this sql query.
Any help will be greatly aprecaited.
Thanks
0
Comments
-
I get the same problem using C/ODBC with Navision 2.6. I solved it using this format string which is strange :
dateField={d 'yyyy-MM-dd'}
And for date manipulating i manage it in my code.
I don't know if it helps you but i hope so !0 -
Hi Varod,
Actually I need a function to get the current date in codbc. How to get the current date.
I can not use the hardcoded value. I can do this using programming but I am using DTS where i need a Sql satement.
Thanks
Rekha0 -
If it's just the T/SQL function you need, then its GetDate() and if you want to go back 5 days it's DateAdd(dd, -5, GetDate())
Just to be complete, there is a GetUTCDate() which gives GMT to avoid time zone issues if you have any.Regards
Mr McGoo0
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