Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How to change Date format while import the data using data entity in D365FO

(0) ShareShare
ReportReport
Posted on by 630

Hi Team,

I will get Text file from third party application.

I have to upload the file using data entity.

In this file date format would be YYMMDD format example: 230602.

while I try to import file using data entity getting below error;

-The specified file is not in the same format as the source data format selected.

-Entity has incorrect data. Please correct the data and try the import again.

 

Please suggest how to solve the issue.

Regards,

Rahul

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: How to change Date format while import the data using data entity in D365FO

    I don't think this will work. But you can give it a try.

    Thanks,

    Girish S.

  • Rahul.p Profile Picture
    Rahul.p 630 on at
    RE: How to change Date format while import the data using data entity in D365FO

    In another block i can see we can achieve this by change EntityName.postGetStagingData() method.

    Below is the link.

    https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/204376/data-entity-staging-table-changes-prior-to-insert?pifragment-96834=1

    Can i achieve this by changing postGetStagingData() method of entity?

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: How to change Date format while import the data using data entity in D365FO

    Hi Rahul,

    You can specify the date format for the EDT.

    Note: But the filters for the date control will not work as it will depend upon the "Date, time, number format" under the user settings.

    Thanks,

    Girish S.

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How to change Date format while import the data using data entity in D365FO

    Date format is controlled in User Options form and is applied on all datetime fields. I don't think you can change it via code for one field.

    community.dynamics.com/.../how-can-i-change-format-all-datetime-to-dd-mm-yy

  • Rahul.p Profile Picture
    Rahul.p 630 on at
    RE: How to change Date format while import the data using data entity in D365FO

    Currently i can import with MMDDYY format.

    Is there any way i can import YYMMDD format by write the code?

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How to change Date format while import the data using data entity in D365FO

    Hi, Please try to export the data entity and check what date format is exported. Try importing using same format.

  • Rahul.p Profile Picture
    Rahul.p 630 on at
    RE: How to change Date format while import the data using data entity in D365FO

    Hi Komi Siabi.

    Thanks for your reply.

    I have check with MMDDYY format also.

    But getting below error.

    -Entity has incorrect data. Please correct the data and try the import again.

  • Suggested answer
    Komi Siabi Profile Picture
    Komi Siabi 12,759 Most Valuable Professional on at
    RE: How to change Date format while import the data using data entity in D365FO

    Hello Rahul,

    I would suggest you update the date format on the source file to MMDDYY and retry.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,111 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,934 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans