-2

I need help, in assign I have

out_Date = Split(Question, "Date: ")(1).Split(Environment.NewLine.ToCharArray(), StringSplitOptions.None)(0)

, but in WriteLine I have the value of the Date argument as 11 feb 2020 04:54:52- 0500 (EST).
How can I set expression only for date like this 02/11/2020?

GSerg
  • 76,472
  • 17
  • 159
  • 346
  • Does this answer your question? [How to remove time portion of date in C# in DateTime object only?](https://stackoverflow.com/questions/6121271/how-to-remove-time-portion-of-date-in-c-sharp-in-datetime-object-only) – TheBatman Feb 17 '20 at 14:10
  • `myDate.ToString("MM'/'dd'/'yyyy")` – Dmitry Bychenko Feb 17 '20 at 14:13

1 Answers1

2

Your question is not clear at all. If I understand correctly, you want to format the date output.

You can use DateTime Format.

Syll
  • 41
  • 2