Import .txt object file error not a valid date

bhalpin
Member Posts: 309
Hi.
I have a very large object file in .txt format in which all object dates are in the form dd-mm-yy. When I import it I get the error '14-02-14;' is not a valid date.
I can manually edit the file to change the dates to dd/mm/yy format, but that will take a while. I'm no VB whiz so that would take even longer (though a reg exp would make short work of this.)
Checking regional settings in Win 8.1 I don't see a format dd-mm-yy that I've been told might help
Is there any NAV setting that can resolve this?
Thanks!
I have a very large object file in .txt format in which all object dates are in the form dd-mm-yy. When I import it I get the error '14-02-14;' is not a valid date.
I can manually edit the file to change the dates to dd/mm/yy format, but that will take a while. I'm no VB whiz so that would take even longer (though a reg exp would make short work of this.)
Checking regional settings in Win 8.1 I don't see a format dd-mm-yy that I've been told might help
Is there any NAV setting that can resolve this?
Thanks!
0
Comments
-
Hi,
The best way to resolve this issue is to find out the regional settings (US,United Kingdom, Germany) that was set on the machine where the .txt file was exported.
IF that is not possible you can take a look at this link
http://en.wikipedia.org/wiki/Date_format_by_country
It seems that Ireland uses the date format dd-mm-yyyy.
Now got to regional settings and on the tab Formats in the field Format change the language to English (Ireland). In the short date change the settings to dd-mm-yy. click on apply button to save changes.
The import of the file should work now.
Do not forget to change the language back.
I hope this helps.
Thanks.0 -
Hi. Thanks!
Well, I got the file in, but lost track of the steps I took.
I did change the country (to Mexico - Ireland didn't seem to work), and I also manually edited all the dates to switch - to /.
Next time (and there probably will be one) I'll put the time into a VB Script to un-mangle the file.
Thanks again!0 -
Follow-up ...
Does anyone remember the text editor 'ED' that came with (DOS) Word Perfect? If I still had a machine that ran DOS I could have knocked off a macro in about 1 minute that would have fixed/re-arranged all the dates.
Oh well.0 -
you could use excel's replace function to change - to /0
-
But I need to swap the order of the day and month as well. Could do with an Excel formula, but a bit of a PITA.0
-
How are you importing it dataport, report?
You could always use COPYSTR to extract the day. month & year then put it back together in the order you want.0 -
Object Designer, File Import.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