System::DateTime::Parse

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jedediah Marcus

    System::DateTime::Parse

    I would like to parse a hebrew date into a System::DateTim e variable:

    System::Globali zation::Culture Info ^CulInfo =
    gcnew System::Globali zation::Culture Info("he-IL");
    CulInfo->DateTimeForm at->Calendar =
    gcnew System::Globali zation::HebrewC alendar;
    CulInfo->DateTimeForm at->DateSeparato r = " ";

    System::DateTim e dt;

    dt.Parse(L"כ״ ג ניסן תשס״ח", CulInfo);

    Unfortunately an exception is fired:

    The string was not recognized as a valid DateTime. There is a unknown
    word starting at index 0.

    Any ideas what could be wrong here?

    J.M.
Working...