Custom formatting for date template codes

Article author
Dan Jordan
  • Updated

What's the context?

Meddbase enables you to use a wide range of template codes in templates for categories of data such as patients, companies, appointments, clinicians, medical histories and prescriptions.

Now, selected date template codes can have custom formatting applied to them. So that their presentation format can vary when used in letters and documents.

What is the purpose of the article?

This article sets out:

What fields can have custom formatting applied to them?

The following fields can have custom formatting applied.

Template Code What it does
{Appointment.Start} Present the start date/time of the appointment.
{Person.DobDate} Present the date of birth of the person that is the subject of the letter or document being generated; typically the patient

A range of template codes are already pre-formatted, so cannot have custom formatting applied.

What custom formats can be used for template codes?

The table below uses a range of template codes showing an example of how each would present data when used in a letter or document.

Template Code Example presentation of data
{Appointment.Start;dddd dd/MM/yyyy} Tuesday 04/01/2022
{Appointment.Start;dddd dd MMMM yyyy} Tuesday 4 January 2022
{Appointment.Start;MM/dd/yyyy HH:mm} 01/04/2022 14:30
{Appointment.Start;HH:mm} 14:30
{Appointment.Start;hh:mm tt} 02.30 PM
{Appointment.Start;h:mm tt} 2:30 PM
{Appointment.Start;d} 04/01/2022
{Appointment.Start;D} 04 January 2022
{Appointment.Start;f} 04 January 2022 14:30
{Appointment.Start;F} 04 January 2022 14:30:00
{Appointment.Start;g} 04/01/2022 14:30
{Appointment.Start;G} 04/01/2022 14:30:00
{Appointment.Start;m} 4 January
{Appointment.Start;o} 2022-04-01T14:30:00.0000000
{Appointment.Start;r} Tue, 04 Jan 2022 14:30:00 GMT
{Appointment.Start;s} 2022-01-04T14:30:00
{Appointment.Start;t} 14:30
{Appointment.Start;T} 14:30:00
{Appointment.Start;u} 2022-01-04 14:30:00Z
{Appointment.Start;U} 04 January 2022 14:30:00
{Appointment.Start;y} January 2022

Similar principles can be applied to the Person.DobDate template code. So for example, a template code {Person.DobDate;D} would be presented in the format 01 January 1990.

Review date

This article was last updated on 3 January 2022 in the context of Meddbase version