What is wrong with a line like this? DateTime.Parse(myString)
Answer Posted / soner gönül
- Different cultures uses different standard date and time formats. This overload can create ambiguous values for the same string in different cultures. Eg: What should "01/02/2016" parsed as? 1 February? 2 January? It depends.
- The Calendar used by CurrentCulture might not have this date and time because of it's boundries.
If anyone interested, I wrote an article in Turkish about that subject.
http://sonergonul.net/datetime-parse-string-kullanmayi-birakamaz-miyiz/
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the significance of attaching a profile while creating a user?
What are directives in asp.net? List down all the important directives.
How do you do Client-side validation in .Net?
Define the steps to set up validation control.
Can you explain how ASP.NET application life cycle and page life cycle events fire?
What does aspcompat="true" mean?
What are sessions used for?
What is the file through which you can customize your asp.net application?
Why asp.net is better than php?
Where are session variables stored?
How do you create a master page?
What are the events that happen when a client requests an asp.net page from iis server?
Explain the different types of directives in .net?
What is difference cookie and session?
Write a code for sending an email from asp.net application.