DateTime now = DateTime.Now; code example
Example 1: c# datetime current
DateTime now = DateTime.Now;
string strDate = now.ToString("YYYY-MM-dd");
Example 2: python datetime now
import datetime
print(datetime.datetime.now()) #datetime.datetime.now() is the syntax