DateTime in C#

Convert DateTime to a string with a relevent format


var usCultureInfo = new CultureInfo ("en-US", false);
var date = new DateTime (2012, 3, 22, 15, 6, 0);
date.ToString ("MM/dd/yy", usCultureInfo);

Author: Indika Abayarathne

MSc in IT [University of Colombo] Solutions Architect | Consultant Technologies: Power Platform | Dynamics CE | Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: