Formats a date by using the invariant (culture-independent) culture.
Use the format method to replace the date object value with a text representation based on the format parameter. The format method formats a date using the invariant (culture-independent) culture. The invariant culture is culture-insensitive.
Use the format method when the formatted value depends on a string comparison or a case-change operation. This makes sure that the behavior is consistent regardless of the culture settings of the system.
The invariant culture must be used only by processes that require culture-independent results, such as system services. Otherwise, the method can produce results that might be linguistically incorrect or culturally inappropriate.
For more information about date and time string formats, see Sys.CultureInfo Class.