I want to compare dates and not display the same information twice. i.e. if I have been somewhere from 5/2/19 - 14/2/19 I want to display: "From 5th - 14th February 2019" rather than the long version, but if over the month (or year) it will need to display all. (I need to write these letters often, so automated the document)
\documentclass[a4paper,12p]{article}
\newcommand{\hospital} {London Hospital }
\newcommand{\system} {Robot 5}
\newcommand{\periodstart} {\newdate{date}{05}{02}{2019}}
\newcommand{\periodend} {\newdate{date}{14}{02}{2019}}
\usepackage{datetime}
\newdateformat{normal}{%
\longdate \ordinaldate{\THEDAY} \monthname[\THEMONTH] \THEYEAR}
\begin{document}
\null\hfill \normal \today \\
\bigbreak
{\bfseries\large \hospital \par}
{\bfseries\large \system \par}
{\bfseries\large Trial period: {\periodstart \normal \displaydate{date}} -- \periodend \normal \displaydate{date} \par}
\end{document}