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)

How to get date in a field X++

(0) ShareShare
ReportReport
Posted on by 174

Hi all,

I have created a field fromDate (FieldDate type) in a table and extended data type for this field is "TransDate", Now i want to store only date in it but its storing date along time like this 9/9/2015 12:00:00 AM. it always store time 12:00:00 AM whatever value is passed through parameter. what should i do in order to store only date in it?

Note: i am passing fromDate through parameter created in contract class and storing its value in table datefield.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Farwa,

    The SQL server is working internally with the time as it only knows date/time fields. When using TransDate as EDT, the business logic within the applicationwill use the date part only.

    It would be interested to know where you see the time part, like Sukrut mentioned also.

  • Farwa Khizar Profile Picture
    174 on at

    Actually I am showing it in report, i have to fetch data on the basis of fromDate and toDate parameters, but this date format is not working if i compare it with systems table date. (system table date is also extended to TransDate). here is the screenshots of report and properties of FromDate field

    17174.Capture.PNG  17174.Capture.PNG

  • Verified answer
    Community Member Profile Picture
    on at

    It happens in SSRS, you need to format your textboxs, setting values like format(Fields!FromDate.value,"MM/dd/yyyy") or using the textbox properties using date for type data

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans