Articles → LIGHT SWITCH 2011 → Change date format of a lightswitch application

Change date format of a lightswitch application
























Software requirement











Prerequisite knowledge











Steps of execution

















Create a new project





Click to Enlarge


Create new tables





Click to Enlarge


Click to Enlarge


Create new screens





Click to Enlarge


Add data to the screen





Click to Enlarge


Add code to change date format




partial void Application_Initialize() {
	Dispatchers.Main.BeginInvoke(() = >{
		CultureInfo ci = (CultureInfo) Thread.CurrentThread.CurrentCulture.Clone();
		ci.DateTimeFormat.ShortDatePattern = "dd-MMM-yy";
		Thread.CurrentThread.CurrentCulture = ci;
	});
}



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, February 28, 2013

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250