AnsweredAssumed Answered

Internationalization of DateTime in SW API

Question asked by Anthony Garland on Aug 2, 2020
Latest reply on Aug 13, 2020 by Fifi Riri

Hi,

 

What is the correct method to get a user's DateTime string parsed into a valid date-time?

 

In c# the following code works fine all over the world, except in Israel, and I have no idea why?

 

  swFeat = (Feature)swModelDoc2.FirstFeature();       
  myDate =  Convert.ToDateTime(swFeat.DateCreated)

The converter throws the exception,

"String was not recognized as a valid DateTime."

Unfortunately, I do not have access to the customer's computer and I can't debug the code other than seeing the thrown exception.

 

Thanks,

 

Anthony

Outcomes