Skip to main content

Notifications

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

How to update excel datetime cells in Dynamics 365 FO

(0) ShareShare
ReportReport
Posted on by 7,257 Super User 2025 Season 1

Hi All,

I have an excel file with data that I imported using an upload file, and I want to change the value of a datetime cell.How do I do this through X++ code?

Regards,

Waed

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    We already have at least six threads about the same thing. Starting the discussion again and again from scratch makes no sense.

  • Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Hi Harry,

    I update Excel cells before calling data entity to import data

    Regards,

    Waed

  • Suggested answer
    Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Ok, so you got an excel and first wanted to correct some data into the excel using code and than import this updated excel into FO using data entity.

    If my understanding is correct, you can write your code into data entity and manipulate excel cell value before importing.

  • Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Hi Harry,

    I have an Excel file I want to upload using file upload, While I am uploading it I want to fill cell "its type datetime" then I want to call data entity to import the updated excel file using data entity

    Regards,

    Waed

  • Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Sorry but now its confusing.

    What exactly you are trying to do,

    Importing excel into FO Or Exporting data from FO,

    Why you want to modify excel from x++ code.

  • Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Modify I want to modify just one cell in Excel.

    Regards,

    Waed

  • Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Modify or insert into D365FO?

  • Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    Hi Harry,

    I want to modify value of datetime cell using this value  1/12/2023 9:46:29 PM for example I am reading value from datetime field in table in Dynamics 365 FO

    Regards,

    Waed

  • Suggested answer
    Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: How to update excel datetime cells in Dynamics 365 FO

    You can try something like below

    str2Date((range.get_Item(i, 2).value),123);

    Also can you share an example of source data and what is expected in target.

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,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans