Internationalization and localization tools


VB.NET Date/Time Formatting Property

using System

DateTime.Now

Internationalization (I18n) Property Overview

The DateTime.Now property is the DateTime object encapsulating the current, local date and time on this computer.

See Microsoft's MSDN online documentation for more information.

I18n Issues

Because DateTime objects are culture-sensitive, developers retrieving this property need to ensure that the CultureInfo has been set properly in the current thread, which would in turn ensure that the DateTime.Now object was instantiated to use the correct set of culture-specific rules.

It is also important to check code that uses the DateTime.Now property to make sure that pieces of the current DateTime aren't being pasted together in a locale-specific way, as in the case of the incorrect usage example below.

General VB.NET date/time formatting information

 

Lingoport internationalization and localization services and software