Gets or sets the current culture used by the Resource Manager to look up culture-specific resources at run time.
// Set the user interface to display in the
// same culture as that set in Control Panel.
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
CurrentCulture Property:
Gets or sets the culture for the current thread.
' Set the user interface to display in the
' same culture as that set in Control Panel.
Showing posts with label Localization. Show all posts
Showing posts with label Localization. Show all posts
Wednesday, July 6, 2011
Saturday, July 2, 2011
Localization of Dates in C#
To store current date as UTC in sql server, sql GETUTCDATE() function can be used( in your storedproc).
Note that GETUTCDATE() returns the current datetime in UTC.
In your codebehind you can use the C# ToLocalTime function method to restore a local date and time value that was converted to UTC
example:
DateTime date1 = new DateTime(2011, 4, 13, 2, 30, 0, DateTimeKind.Local);
DateTime utcDate1 = date1.ToUniversalTime();
DateTime date2 = utcDate1.ToLocalTime();
DateTime utcDate1 = date1.ToUniversalTime();
DateTime date2 = utcDate1.ToLocalTime();
Subscribe to:
Posts (Atom)
How to upload app to macOS
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
Generating an API Key Before you can add an Apple Developer Account to Visual Studio, you'll need to generate an API Key. Generating a...
-
Log in to the Play Console: Go to the Play Console website ( play.google.com/console ) and log in with your Google Play Developer account....