C# and NAV not use the same date format?

julkifli33
Member Posts: 1,092
hi all
i create codeunit in nav
and it works to import
i'm using web service to access nav from C#
but when i import data (for date type), it tells me '23/12/2011' is not a valid date.
i use the same pc but the date i think from C# itself using MMDDYYYY
how to solve this?
i create codeunit in nav
and it works to import
i'm using web service to access nav from C#
but when i import data (for date type), it tells me '23/12/2011' is not a valid date.
i use the same pc but the date i think from C# itself using MMDDYYYY
how to solve this?
0
Comments
-
my code in codeunit like this
PostingDateText := FORMAT(COPYSTR(vString,1,PosCode-1)); EVALUATE(PostingDate,PostingDateText); SH."Posting Date" := PostingDate;
is there something wrong?0 -
Depends on how you are passing the date. If you are using paramter of type date, it will work ok. If you are passing it as text, than you need to parse the xml format correctly.0
-
There is a build-in function to parse xml-formatted dates.0
-
0
-
kine wrote:Depends on how you are passing the date. If you are using paramter of type date, it will work ok. If you are passing it as text, than you need to parse the xml format correctly.0
-
mdPartnerNL wrote:
i thought there is another method to solve this issue
anyway, i use this first0
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