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.
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.
Hi, There are generally two ways to format date
Format date in VS code.
Format date in SSRS
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
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.
I am not sure exactly what your question is. But here is the documentation for the different formats available for different data types.
André Arnaud de Cal...
292,886
Super User 2025 Season 1
Martin Dráb
231,768
Most Valuable Professional
nmaenpaa
101,156
Moderator