2

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

Dylan Pinn
  • 304
  • 2
  • 10

1 Answers1

2

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");
Marko Jovanov
  • 418
  • 10
  • 25