-4

how can I get today datetime from 00:00, for example when I Use:

var dt=DateTime.Now; // 2019/1/1 15:22:22

I need Another extention method to give this string format:

string today = dt.TodayBegining(); // 2019/1/1 00:00:00

1 Answers1

1

Just

DateTime.Today

Doc: DateTime.Today Property

An object that is set to today's date, with the time component set to 00:00:00.

Massimo Prota
  • 1,226
  • 7
  • 14