none
DateTime.TryParse failing on one specific platform

    Question

  • I am developing an application that takes data (mostly dates) from a server, and I have to parse the dates contained in the result to extract the year. I'm using two DateTime.TryParse attempts per date result, with two different culture information values (en-US and fr-FR).

    I cannot use DateTime.TryParseExact since I do not know how many dates with different date formats exist within the database I'm extracting data from.

    I have tested the application in question in the following machines/platforms:

    • Windows 8.1 (PC)
    • Windows 8.1 (Surface 3)
    • Windows 8.1 (Visual Studio Emulator)
    • Windows 10 (Virtual machine)
    • Windows 10 (Surface Pro 3)
    • Windows 10 (PC)

    The problem is that the application cannot seem to parse the data correctly in one of the machines being used, and will only return what I presume to be null values.

    Of the machines tested, only the Windows 10 running on the Surface Pro 3 seems to be having this issue. Could this be an issue regarding missing culture information in the machine?

    Any other input or any clarification is welcome.

    Monday, March 14, 2016 3:35 AM

Answers

All replies

  • Hi jim,

    As you said, DateTime.TryParse failing on Windows 10 (Surface Pro 3) platform.

    Your issue should be post in Surface Pro 3 development forum. Since I don't know the right forum's link. I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.

    Have a nice day!

    kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Kristin Xie Tuesday, March 15, 2016 2:52 AM
    Tuesday, March 15, 2016 2:51 AM
  • You might try over here.

    https://social.technet.microsoft.com/Forums/en-us/home?category=surface

    http://answers.microsoft.com/en-us/surface/forum/surfpro3

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Tuesday, March 15, 2016 3:25 AM
    Moderator