Skip to content
+1-888-319-3663

COMMUNITY FORUM

Date Calculation issue

Manny asked 5 years ago
Hello!
 
I have a source CSV file that is sending a date in the following format:
2016-12-08T00:00:00+0000
My destination (GP) won’t take the date in this format so I have to use a calculation to convert the date to a GP format.  When I try to use the  SmartConnect “Date Column” calculation, it returns a different date.
It returns:
2016-12-07
Here are the settings in the Date Column calculation:
Source Data: [date from CSV]
Source Format: System format
Target Format: GP Date Format
 
Additional information… I am grouping the data.   The data set contains these dates:
2016-12-06T00:00:00+0000
2016-12-07T00:00:00+0000
2016-12-08T00:00:00+0000
 
Also, I’m trying to get the “Max” or latest date from the set.  Which should be 2016-12-08.    
 
If I send the results to “Microsoft Dynamics GP – File” the and use the original source field date, I get the correct date (but not the format I need) 016-12-08T00:00:00+0000.
If I use the calculated date field, it gives me 2016-12-07.
Jared Dux Staff replied 5 years ago

The 2016-12-08T00:00:00+0000 is right when integrated as the previous day. The best way to get just the date to show as 2016-12-08 would be to create a calculated field and use only the first 10 characters. Use a normal calculated field and set the calculation to: return _YOURFIELD.Substring(0,10)

Manny replied 5 years ago

Hi Jared,

I’m not sure what you meant by “is right when integrated as the previous day”, but I was able to use your suggestion (Substring) and this worked great. Thanks!


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