[SOLVED] Format Datetime in email |
11/27/2015 10:59:40 | |
| ASPRunner.NET General questions | ||
|
How can I format the datetime field to not show time when emailing the value? |
||
|
|
Sergey Kornilov admin 12/1/2015 |
|
You can use something like this: String.Format("{0:dddd, MMMM d, yyyy}", Convert.ToDateTime((string)values["AppointmentDate"]) )
|
|
|
|
jadach authorDevClub member 12/7/2015 |
|
Thank you for the response. I am having difficulty adding this to the following. I cannot get the syntax right. Can you help? |
|
|
|
Sergey Kornilov admin 12/8/2015 |
|
Try something like this: string msg = "Appointment<br />"+values["AppointmentName"].ToString()+"<BR />Details<br />"+values["Details"].ToString()+"<br />"+String.Format("{0:dddd, MMMM d, yyyy}", Convert.ToDateTime((string)values["AppointmentDate"]) ); |
|
|
|
jadach authorDevClub member 12/9/2015 |
|
Thank you so much!!! |
|