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 can we add st/nd/rd/th for the date in business central

(0) ShareShare
ReportReport
Posted on by 130

I would like to print date  in format "(11th June 2022)" can we do by using the format function or any other function.   I am attaching the screenshot of my code by using the format function. how can we add st/nd/rd/th  for the date in business central.

Format2.PNG

  • Suggested answer
    YUN ZHU Profile Picture
    78,735 Super User 2025 Season 1 on at
    RE: How can we add st/nd/rd/th for the date in business central

    Hi, There are generally two ways to format date

    Format date in VS code.

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-format-property

    Format date in SSRS

    http://jackdonnell.com/?p=122

    If neither of these two can be achieved, you need to define a procedure in Codeunit yourself. In Japan, there are generally dedicated date formats, so this is very common.

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Dallefeld Profile Picture
    173 User Group Leader on at
    RE: How can we add st/nd/rd/th for the date in business central

    None of the standard formats are going to give you what you are looking for. You are probably going to have to right code that reads the day of the month and add st to 1, nd to 2, rd to 3, th to 4 through 20, st to 21, nd to 22, rd to 23, th to 24 through 30 and st to 31.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    999 Moderator on at
    RE: How can we add st/nd/rd/th for the date in business central

    I am not sure exactly what your question is. But here is the documentation for the different formats available for different data types.

    docs.microsoft.com/.../devenv-format-property

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February 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... 292,886 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,768 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans