Skip to content
+1-888-319-3663

COMMUNITY FORUM

SQL Date Formats

Matt Connor asked 6 years ago
More of a bug report than a feature request, sorry
I was having an issue where SmartPost was crashing Dynamics GP. It was finding the batches to post ok but when trying to post it just killed GP
This was when GP was logged into one company but was posting in another
The Event Viewer message was typically vague so I ran a SQL trace and I spotted the issue straight away on the last line before the crash:
USE DYNAMICS
insert into Activity (USERID, CMPNYNAM, LOGINDAT, LOGINTIM, SQLSESID, Language_ID, IsWebClient) values (‘jp1’, ‘Test Company’, ’14/05/2015 00:00:00′, ’01/01/1900 22:24:36′, 9708, 1, 0)
This is failing due to the UK date format (the Windows user having UK regional settings)
The simple fix would be to use a region agnostic date format such as yyyy-MM-dd
Thanks
Matt
Answers
Patrick Roth Staff answered 6 years ago
Matt,
There isn’t much in an EventViewer record because Windows is recording the crash and not the application. Looking at the SQL trace was a good idea and cool that it does give a suggestion to the issue.
I tested this on my system and I can see the same thing.  I’m US format and so I don’t crash but I can see that in your trace you likely had a ‘string to datetime’ conversion error which SmartPost didn’t handle at all and so ended up causing GP to crash.
I’ll write a bug up for this as the date format on the SQL connection is ymd (which is great) but then we should be providing the date in that format which would solve this.
patrick
Matt Connor replied 6 years ago

Cool, thanks Patrick

Is there anyway to get automatically notified when new builds are released?

Cheers

Matt

Patrick Roth Staff replied 6 years ago

No, there isn’t anything that ties these systems together that would allow this.
I wrote this up as bug 11508 just now.


If you would like to submit an answer or comment, please sign in to the eOne portal.