Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

BC Table Fields linked to CRM Field

Posted on by 100

Hi,

I have a scenario where BC Table say "Table1" has "Field1" which is linked to the Field in the CRM Database. 

In the CRM Database, the field is of type "DateTime" which includes Date, Time & Time Zone in the field value. 

But in BC the same value is displayed as just Date. It doesnt contain Time nor the Time Zone.

Any Idea why this is happening? 

Also, is there a possibility to subtract Time from Date variable?

Thanks

Johnson Patrick

  • Suggested answer
    Greg Enns Profile Picture
    Greg Enns 1,102 on at
    RE: BC Table Fields linked to CRM Field

    Fields in BC and CRM can be defined as either Date or DateTime.

    Your CRM DateTime field is apparently mapped to sync with a Date field in BC.

    To change that, (1) Create a new Datetime field and then (2) update the Field Mapping to point the CRM field at your new DateTime field.

  • Suggested answer
    Greg Enns Profile Picture
    Greg Enns 1,102 on at
    RE: BC Table Fields linked to CRM Field

    Fields in both CRM and BC can be defined as either Date or DateTime. Apparently your BC field is a Date field.

    If you want BC to show datetime, then (1) create a DateTime field and (2) change the Field Mapping to point the CRM DateTime field to your new DateTime field in BC.

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: BC Table Fields linked to CRM Field

    Then you can use CreateDateTime(Today, 0T) function. Enter date in first and time if you need other wise 0T for 00:00

  • Johnson_Patrick Profile Picture
    Johnson_Patrick 100 on at
    RE: BC Table Fields linked to CRM Field

    Hi,

    Thanks for your input.

    Right, i know the function DT2Date(DateTime). But the primary problem being, data in the BC field is Date and not a DateTime. While in CRM its DateTime.  

    Any idea why?

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: BC Table Fields linked to CRM Field

    Hi,

    Yes, there is function that you can use to convert Datetime to Date using DT2Date(DateTime).

    Regarding TimeZone Business Central stores the time in DB in UTC

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans