# Changing date format in datetime2

Using the datetime2 package, how do I tell \today to display the date in the format: 'Fri, March 1, 2019'?

\documentclass{article}
\usepackage{datetime2}
\begin{document}
\today
\end{document}


Below I define a new date style called mydateformat, and then use it with \DTMusedatestyle{mydateformat}.

\documentclass{article}

\usepackage[calc,showdow,english]{datetime2}

\DTMnewdatestyle{mydateformat}{%
\renewcommand{\DTMdisplaydate}[4]{%
\DTMshortweekdayname{##4},\space% short weekday,
\DTMmonthname{##2}\nobreakspace%  (full) Month
\number##3,\space%                day,
\number##1%                       year
}%
\renewcommand{\DTMDisplaydate}{\DTMdisplaydate}%
}

\begin{document}

\today

\DTMsetdatestyle{mydateformat}

\today

\end{document}


In the documentation, page 90 you can find:

So you can try the following code:

\documentclass{article}

\usepackage[british]{babel}
\usepackage[showdow]{datetime2}
\DTMlangsetup[en-GB]{ord=raise,monthyearsep={,\space},abbr}
\DTMsetdatestyle{en-GB}

\begin{document}
today: \today
\end{document}


and its result is:

To get the order you want you need to change the used style to american veriant like in the following code:

\documentclass{article}

\usepackage[english]{babel}
\usepackage[showdow,en-US]{datetime2}
\DTMlangsetup[en-US]{ord=raise,abbr}
\DTMsetdatestyle{en-US}

\begin{document}
today: \today
\end{document}


with its result:

Option abbrv does also work with month, so day name and month name are short printed. If you leave abbrev out, both are long printed. An option to get only the day short printed I could not found. needs a patch I think.

Depending on what you want to do with that code I would leave out the day name ...