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

Announcements

No record found.

News and Announcements icon
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 625

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
    625 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,850 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,045 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans