web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Getting date without time in Excel

(0) ShareShare
ReportReport
Posted on by 2

Hello, i'm fetching data from a customize table. I'm fetching Start and End date on excel sheet. It shows both date and time in a column. how to get only date in a column. Kindly do let me know

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,904 Most Valuable Professional on at

    Hi Zohan, can you please provide a title for your question? "Ax Dynamics" doesn't say anything useful, because this whole forum is about Dynamics AX (and we even know that it's about AX 2012, because you're forced to pick a version when posting your question).

    Also, can you please explain your problem with more details? It will increase your chance to get a solution.

  • Zohan Profile Picture
    2 on at

    Martin i'm Fetching data from Ax2012 to Excel sheets. Now when ever i'll fetch start and end date i'll always get date + time. Mean while i just want date to be fetched only.

    what i get:

    xlsworksheet.cells().item(row,1).value(Table_name.StartDate)

    Start Date: 1/2/1900 18:36

    what i want

    xlsworksheet.cells().item(row,1).value(Table_name.StartDate)

    Start Date:1/2/1900

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Zohan,

    This issue has been discussed here multiple times, please refer to one of similar threads community.dynamics.com/.../166599

  • Martin Dráb Profile Picture
    237,904 Most Valuable Professional on at

    I see you forgot to change the title, so let me help you this time. Please make sure you read Suggestions for Posting a New Question before creating any more threads.

    Also, I see you marked your reply as the suggested answer, which makes little sense. I'll fix it too.

    Please notice that I could have used this time to help you with the actual question. Try to do a better job next time.

  • Zohan Profile Picture
    2 on at

    will you please help me to find out the solution? sir

  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    Hi Zohan,

    Did you check the link provided by Ievgen?

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    While exporting data to the excel, you can extract only date value from the datetime field using DateTileUtil::date function like DateTileUtil::date(tableName.createDateTime);

    Refer following link:

    (DateTimeUtil::date Method [AX 2012])

    msdn.microsoft.com/.../datetimeutil.date.aspx

  • Zohan Profile Picture
    2 on at

    yes but still i can't find a solution

  • Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Can you post your code such that we can check where it's causing the problem.

  • Zohan Profile Picture
    2 on at

    i'm Fetching data from Ax2012 to Excel sheets. Now when ever i'll fetch start and end date i'll always get date + time. Mean while i just want date to be fetched only.

    what i get:

    xlsworksheet.cells().item(row,1).value(Table_name.StartDate)

    Start Date: 1/2/1900 18:36

    what i want

    xlsworksheet.cells().item(row,1).value(Table_name.StartDate)

    Start Date:1/2/1900

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans