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 :
Small and medium business | Business Central, N...
Suggested Answer

How to add fields of Time and DateTime?

(0) ShareShare
ReportReport
Posted on by 607

Hi All,

I am quite new D365 BC.

I wanted to add fields of type of Time and Date Time. I have added the fields the following way : 

pastedimage1582027145112v1.png

But for the Time filed , i am not able to select time. I want the Time format to be : HH:MM AM/PM

For Date Time field, I am able to select the date but not the time. The Format i need is : HH:MM AM/PM

I also wanted a string field of format : 50 characters (show 2 25 position fields).

How can i achieve this? Pls explain in detail.

Thanks in advance.

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Try setting the AutoFormatExpr property of yout Time field, eg '<Hours24>:<Minutes,2> <AM/PM>'

    Also set DataClassification = CustomerContent;

    For a Text field, as the DataType use 'Text[50]'

  • AXBOY Profile Picture
    607 on at

    Hi Mark,

    For Time Field , Like This : AutoFormatExpression = '<Hours24>:<Minutes,2> <AM/PM>'?

    Also for the text filed ,I need 50 as limit, but i need it to be of 2 positions of 25 characters each.

    How can i achieve this?

  • Community Member Profile Picture
    on at

    For detals of format strings, see docs.microsoft.com/.../format-property

    By positions, do you mean lines? Why not just make two Text[25] fields?

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans