Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. If your string format for the DateTime is fixed you can convert to the System.DateTime using: string myDate = "12-Apr-1976 22:10"; DateTime dateValue = DateTime.Parse(myDate); Now, when you need it in your specific format, you can then reverse the process, i.e.: string formatForMySql = dateValue.ToString("yyyy-MM-dd HH:mm"); edit - updated code.

  2. 21 mar 2011 · Put the value of a human-readable string into a .NET DateTime with code like this: DateTime.ParseExact("April 16, 2011 4:27 pm", "MMMM d, yyyy h:mm tt", null);

  3. 11 kwi 2015 · Solution 1. If you're having 00-00-0000 date value stored, (Which is special zero value [^]; or you can say DateTime's NULL value), then you should know that .NET framework's DateTime object has a limitation over the DateTime value too, this might be the reason for your errors.

  4. DateTime.TryParse method. Restore (round-trip) a date and time value created by a formatting operation. Pass the "o" or "r" standard format string to the ToString (String) method, and call the Parse (String, IFormatProvider, DateTimeStyles) overload with DateTimeStyles.RoundtripKind.

  5. 7 kwi 2023 · SQL date strings can be handed with DateTime.Parse. This is useful when you have database text-only data. DateTime.Parse works on the date time format in the MySQL database.

  6. 17 wrz 2021 · DateTime can be converted from string (TypeDescriptor.GetConverter(typeof(DateTime)).ConvertFromString("01.01.0001")), while DateOnly and TimeOnly cannot. This causes some issues.

  7. 13 maj 2021 · You can convert a string to a DateTime (parse) with one of these methods: DateTime.Parse() (or TryParse). Use this to parse a variety of standard formats (culture-specific or ISO-8601) DateTime.ParseExact() (or TryParseExact). Use this to parse from a specific format. I’ll show examples of using both methods for parsing various DateTime formats.

  1. Ludzie szukają również