UPDATE!!
Hello readers, below instructions use to work 2 years ago, and now they don’t appear to work anymore.
Most likely, you would need to ask your developer to send the field in the needed format via a report extension or report.
Original blog
One of my co-workers asked how can we format a date field in a MS Word Layout document so that it only shows the date but not the time.
To get started with adding fields to a Word Report Layout start with this:
How to Add Fields to a Word Report Layout – Business Central | Microsoft Docs
Let’s say you added a date field: CustomDate to a BC report.
When you run the report the date field renders on the report as DateTime: 30-06-2021 12:00:00.
How do we enforce the report to only display the date: 30-06-2021
Let’s look at a simple example: you want to add to the report 206, Sales Invoice, in a custom Word Layout the DueDate_SalesInvHeader field from the dataset.
If you followed the link above you might have now a control on your document that looks like this:

If this field is coming from AL with Date and Time components, how do we format it so it only shows the Date?
In RDLC you would go to the properties of the text box that is hosting your datetime field and change the Format property to “d”.
How about Word Layouts?
It’s quite simple, but not easily available in the documentation.
You would change the date field in the layout to show like this:

You can change the formatting to match your region. In US: dd/MM/yyyy.
There is always the option of writing an extension and send to layout an already formatted date field as text.



8 Responses
Hello
I can’t see how to do this in work, I don’t see this, I don;t see the field as { { field name } }. How do I make the changes?
Nick
CTRL + F9, see this: https://www.thedoctools.com/word-macros-tips/word-tips/word-fields-useful-keyboard-shortcuts/#:~:text=Short%20overview%20of%20field%20shortcuts%20-%20with%20names,%20%20InsertFieldChars%20%203%20more%20rows%20
Hello
The date switch to use should be { DATE DueDate_SalesInvHdr \@ “dd/MM/yyyy” }
Highlight the field then hit ctrl + F9 to add curly brackets around it. Then edit text between brackets to look like the above.
Hi!
Has this feature been removed? It seems like there is some buz on the internet about this with the solution above amongst others, but people cannot seem to get this to work. Tried several different versions of this formating but it gives a lot of errors. Getting the curly brackets with the ctrl-f9 shortcut seems to be the only thing that repeatedly works.
Thanks =)
Used to work. No longer I can connect the fields with the data set. Deal with the field and include it in the data set then drag and drop it in word layout.
So how do I still format a date? Craciun Fericit!
Send it already formatted from AL. Sarbatori fericite!
AL code