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


Please Help Members By Posting Answers For Below Questions

How do I send an email message from my ASP.NET page?

527


Why do we use asp.net?

583


Explain the code Access Security (CAS) in .net Framework?

665


What is difference between singleton and single call?

642


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1761






Difference between web user control and web custom control?

500


Difference between .NET and previous version?

2102


How to rename a table using sql queries?

568


What does ascx stand for?

502


Explain file-based dependency and key-based dependency.

567


Explain difference betn dataset and recordset?

526


What is the use of session in web application?

481


What does asp in asp.net stand for?

515


Explain server side state management system.

547


How to register exception filter globally?

578