CultureInfo.DateTimeFormat
Imports System
Imports System.Globalization
Public Class SamplesCultureInfo
Public Shared Sub Main ()
Dim myCI As New CultureInfo ( "en-US" , False )
Dim myCIclone As CultureInfo = CType ( myCI.Clone () , CultureInfo )
myCIclone.DateTimeFormat.AMDesignator = "a.m."
myCIclone.DateTimeFormat.DateSeparator = "-"
myCIclone.NumberFormat.CurrencySymbol = "USD"
myCIclone.NumberFormat.NumberDecimalDigits = 4
Console.WriteLine ( myCI.DateTimeFormat.AMDesignator )
Console.WriteLine ( myCIclone.DateTimeFormat.AMDesignator )
Console.WriteLine ( myCI.DateTimeFormat.DateSeparator )
Console.WriteLine ( myCIclone.DateTimeFormat.DateSeparator )
Console.WriteLine ( myCI.NumberFormat.CurrencySymbol )
Console.WriteLine ( myCIclone.NumberFormat.CurrencySymbol )
Console.WriteLine ( myCI.NumberFormat.NumberDecimalDigits )
Console.WriteLine ( myCIclone.NumberFormat.NumberDecimalDigits )
End Sub
End Class
Related examples in the same category
1. Date time: Now, Today and UTC Now 2. Date Time Detail: Long Date String, day of week, days in month 3. Is Leap Year 4. Get Date Time Now 5. Display the various properties for a Date 6. Finding the Last Day of the Month 7. Assign a value according to the current day of the week. 8. DateTime.ParseExact passes a string object followed by a format specifier and a CultureInfo object 9. DateTimeOffset represents time relative to Coordinated Universal Time (UTC). 10. Find difference between Now and UtcNow using DateTimeOffset 11. Add two and a half hours to DateTimeOffset 12. Convert DateTimeOffset to Universal Time 13. DateTime - DateTime = TimeSpan 14. DateTime.ParseExact Converts string to DateTime using specified format, culture-specific format information, and style 15. DateTime.Subtract subtracts the specified date and time from this instance. 16. DateTime.Ticks represents the number of ticks that represent the date and time 17. DateTime.Today Property Gets the current date. 18. DateTime.ToFileTime Method converts DateTime to a Windows file time. 19. DateTime.ToLocalTime Method converts DateTime object to local time. 20. DateTime Kind, Now properties, and the SpecifyKind(), ToLocalTime(), and ToUniversalTime() methods. 21. DateTime.ToLongDateString converts DateTime to long date string 22. Converts the value of the current DateTime object to its equivalent short date string representation. 23. DateTime.ToString Method converts DateTime to string using the specified culture-specific format information. 24. DateTime.ToString converts DateTime to string using the specified format. 25. Converts DateTime to string using the specified format and culture-specific format information. 26. Combine date format with DateTimeFormatInfo.InvariantInfo 27. Converts DateTime to string representation. 28. Converts DateTime object to Coordinated Universal Time (UTC). 29. Converts string to DateTime equivalent and returns a value that indicates whether the conversion succeeded. 30. Converts string to DateTime using specified culture-specific format information and formatting style 31. Converts string to DateTime using specified format, culture-specific format information, and style 32. DateTime.Year Property gets the year component of the date represented by this instance. 33. DateTimeFormatInfo defines how DateTime values are formatted and displayed, depending on the culture. 34. DateTime format: D 35. DateTime format: f 36. DateTime format: F 37. DateTime format: g 38. DateTime format: G 39. DateTime format: m 40. DateTime format: M 41. DateTime format: o 42. DateTime format: r 43. DateTime format: R 44. DateTime format: s 45. DateTime format: t 46. DateTime format: T 47. DateTime format: u 48. DateTime format: U 49. DateTime format: y 50. DateTime format: Y 51. Difference Between DateTime, DateTimeOffset, and TimeZoneInfo 52. Create DateTime structure to the specified year, month, and day. 53. Create DateTime structure to the specified year, month, and day for the specified calendar. 54. Create DateTime structure to the specified year, month, day, hour, minute, and second. 55. Create DateTime structure to the specified year, month, day, hour, minute, and second for the specified calendar. 56. Create DateTime structure to the specified year, month, day, hour, minute, second, and Coordinated Universal Time (UTC) or local time. 57. Create DateTime structure to the specified year, month, day, hour, minute, second, and millisecond. 58. Create DateTime structure to the specified year, month, day, hour, minute, second, and millisecond for the specified calendar. 59. Create DateTime structure to the specified year, month, day, hour, minute, second, millisecond, and Coordinated Universal Time (UTC) or local time for the specified calendar. 60. Create DateTime structure to the specified year, month, day, hour, minute, second, millisecond, and Coordinated Universal Time (UTC) or local time. 61. Create DateTime structure to a specified number of ticks. 62. DateTime Min value 63. DateTime ToString with Invariant Culture 64. Add specified TimeSpan to DateTime 65. Add days to DateTime 66. Add hours to DateTime 67. Add milliseconds to DateTime 68. Compares DateTime value 69. Get date and time fields from DateTime 70. Determines whether two specified instances of DateTime are equal. 71. Returns a value indicating whether this instance is equal to the specified DateTime instance. 72. DateTime.Equals(DateTime, DateTime) Returns a value indicating whether two instances of DateTime are equal. 73. DateTime.FromBinary Deserializes a 64-bit binary value and recreates an original serialized DateTime object. 74. DateTime.FromFileTime Converts the specified Windows file time to an equivalent local time. 75. DateTime.GetDateTimeFormats 76. The largest possible value of DateTime. This field is read-only. 77. DateTime Minute Property 78. The smallest possible value of DateTime. 79. DateTime.Parse converts string to DateTime 80. Converts string to DateTime using the specified culture-specific format information. 81. Converts string to DateTime using the specified culture-specific format information and formatting style. 82. Converts string to DateTime using specified format and culture-specific format information