Skip to main content

Notifications

Announcements

No record found.

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

time is not updating properly in AX from excel in AX 2012 R3

(0) ShareShare
ReportReport
Posted on by

hi,

This is excel template. Working for Singapore entity

5706.a2.jpg

Code - 

Shipment arrival date and time

shippmentArrival    = DateTimeUtil::newDateTime(cells.item(row,4).value().date(),cells.item(row,4).value().time());

In debugging it's showing proper date and time but after update in table it showing different time

Debugging

7242.a3.jpg

But in AX after updating it's showing different time. This is the only issue...

5415.a5.jpg

Pls let me know why it's updating time 12:30:15 PM instead of 5:30:15 PM.

How can i update 5:30:15 PM ?

Please give me more shed on this.

thanks!

  • Martin Dráb Profile Picture
    Martin Dráb 230,414 Most Valuable Professional on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    Yes, if you don't know the answer, you'll need to get back to analysis.

  • @rp@n Profile Picture
    @rp@n on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    thanks Martin,

    Actually the data provided by he customer.

    Shall i ask to customer ? What time zone they filled in excel and what they expected to get time in AX?

    am i right?

  • Martin Dráb Profile Picture
    Martin Dráb 230,414 Most Valuable Professional on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    You should know what data you're importing.

    If you have no idea about the time zone of the data in Excel, how do you want to convert it to Singapore's time zone? It's not possible.

  • @rp@n Profile Picture
    @rp@n on at
    RE: time is not updating properly in AX from excel in AX 2012 R3
    [deleted]
  • @rp@n Profile Picture
    @rp@n on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    thanks Martin,

    As you said "But if you know in which time zone it is, you can keep current values in Excel and convert them to UTC in AX"

    Kindly let me know from where i am getting the time zone information ?

    Pls give me more shed on this.

    thanks!

  • Martin Dráb Profile Picture
    Martin Dráb 230,414 Most Valuable Professional on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    It's not a format!

    If you want to do it manually, modify all times in the Excel file. For example, if you know that the values are from a time zone with which is four hours behind UTC, add four hours to all times.

    But doing it manually doesn't make a good sense. If you can make sure that the Excel file gets generated with times in UTC, then all right. But if you know in which time zone it is, you can keep current values in Excel and convert them to UTC in AX. You just need to remove the offset - please look again at the previous answers for details.

  • @rp@n Profile Picture
    @rp@n on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    thanks Martin,

    Can you please let me know how I will set the UTC time in excel format? as it is not in UTC format currently as you said...

    Pls. give me more shed on this.

    thanks!

  • Martin Dráb Profile Picture
    Martin Dráb 230,414 Most Valuable Professional on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    Hmm, does it mean that you don't know what UTC means and therefore you understand nothing from what we told you in this thread? You should have asked or use a search engine to find what is the UTC thing we keep mentioning.

    UTC means Coordinated Universal Time and you can think about it as a time zone. It's not a string format, as you seem to think.

    For example, if I have 2 PM in the Excel file, and my time zone offset is UTC+1, UTC is 1 PM. If I applied Singapore's time zone offset (UTC+8) to my local time, instead of the UTC time, the result would be one hour off (10 PM instead of 9 PM). You can't just add 8 hours to time in any time zone; it must be in UTC. That's why it's som important to ask whether what time you have in your Excel file.

  • @rp@n Profile Picture
    @rp@n on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    Hi Martin,

    4628.a2.jpg

    In excel the date time in above format.

    Kindly let me know if any thing else  information required?

  • Martin Dráb Profile Picture
    Martin Dráb 230,414 Most Valuable Professional on at
    RE: time is not updating properly in AX from excel in AX 2012 R3

    Unfortunately you still gave us no answers, so let me ask once more.

    Your code assumes that the time in Excel is in UTC, but is it true? Please answer at least this one question.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans