Skip to content
+1-888-319-3663

HELP ARTICLE

Datetime field in SmartConnect different than in Dynamics 365 Sales/CRM


How to resolve the datetime field in SmartConnect displaying a different value than in the  Dynamics 365 Sales/CRM User Interface.

Cause

SmartConnect uses the D365 web services to pull your data source. The web services return datetime fields exactly as they are stored in the D365 SQL tables. There are four ways datetime fields are stored.

  • User Local: Date is stored in table as UTC and when a client pulls the date it is converted to the user’s local time zone.
  • Time-Zone Independent: The value is stored in the local format, and will be retrieved by all clients in the same format.
  • Date Only: Only the date is set, but the field will contain a time value of 12:00AM.
  • Time Only: Only the time value is set, but the field will use the current date.

The format that will be used to set the date are specified when creating the field in CRM.

Resolution

User Local

A Calculated Column can be used to convert the field to the correct value.

If _MSDYN_TIMEWINDOWSTART = “” then

return “”

else

Dim UTCdate as date = _MSDYN_TIMEWINDOWSTART

return UTCdate.ToLocalTime()

end if

 

Date Only

A Calculated Column can be used to return only the date.

If _MSDYN_TIMEWINDOWSTART = “” then

return “”

else

return Convert.ToDateTime(_MSDYN_TIMEWINDOWSTART).ToString(“yyyy-MM-dd”)

end if

 

Time Only

A Calculated Column can be used to return only Time value

‘Time-Zone Independent

If _MSDYN_TIMEWINDOWSTART = “” then

return “”

else

return Convert.ToDateTime(_MSDYN_TIMEWINDOWSTART).ToString(“hh:mm tt”)

end if

 

‘Time-Zone Dependant

If _MSDYN_TIMEWINDOWSTART = “” then

return “”

else

Dim UTCdate as date = _MSDYN_TIMEWINDOWSTART

return UTCdate.ToLocalTime().ToString(“hh:mm tt”)

end if

Resource

Microsoft article about date and time fields.

 

RECENT POSTS


Use the REST Connector to parse nested Value Arrays
SmartConnect email task fails with error: An invalid character was found in the email header
Does SmartConnect import into Avalara Avatax software
Could not initialize a collection when launching SmartConnect
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key when you open a SmartConnect map.

POPULAR POSTS


SSL Security error using OLEDB Connection
This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms
Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
The server process could not be started because the configured identity is incorrect.
Using WINSCP and a task to upload or download files from an SFTP site

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.