Search code examples
umbracoumbraco7umbraco-contour

Umbraco Form - Remove time from Datepicker date in email


I have a form that contains a Datepicker and in the email that is sent on submission the date is formatted with a time.

How do I remove the time from the date?

Thanks


Solution

  • You can either change the property to just Date, without the time element, or you can use ToString() method for the DateTime within C#: https://msdn.microsoft.com/en-us/library/zdtaw1bw(v=vs.110).aspx

    The format without time would look something like this:

    yourDate.ToString("DD/MM/YYYY");