| |||||||
DateTimeFormatInfo.TimeSeparator PropertySystem.Globalization Namespace DateTimeFormatInfo Class Sets or retrieves the string that separates the components of time; that is, the hour, minutes, and seconds. [ VB ] public Property TimeSeparator As String [ C# ] public string TimeSeparator {get; set;} [ C++ ] public: __property String* get_TimeSeparator ( ); public: __property void set_TimeSeparator ( String* ); [ JScript ] function get TimeSeparator ( ) : String; public function set TimeSeparator ( String ); Property ValueThe string that separates the components of time; that is, the hour, minutes, and seconds. The default for InvariantInfo is ":". Exceptions
RemarksIf the custom pattern includes the format pattern ":", DateTime.ToString displays the value of TimeSeparator in place of the ":" in the format pattern. ExampleThis example shows how you can create a DateTimeFormatInfo object for a given culture, to gain access to the TimeSeparator property for the specified culture. First, you need to instantiate a CultureInfo object with the specified culture name, and then retrieve the CultureInfo.DateTimeFormat property. This returns a DateTimeFormatInfo instance specific to the given culture, which you can then use to get to any DateTimeFormatInfo method or property, such as TimeSeparator. See AlsoDateTimeFormatInfo Members DateSeparator |
| ||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme