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.

  • Community Member Profile Picture
    on at
    RE: How to add fields of Time and DateTime?

    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?

  • AXBOY Profile Picture
    607 on at
    RE: How to add fields of Time and DateTime?

    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?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to add fields of Time and DateTime?

    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]'

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,424 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,043 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans