Converting from one calendar type to another

  • Thread starter Thread starter Elisha Berns
  • Start date Start date
E

Elisha Berns

Question:

Is there a way to convert a date from one calendar
representation to another?

For example, I create a date using the system invariant
calendar and the current local time. Then I try to
create a new DateTime object using the above date and the
HebrewCalendar (after switching the thread locale to he-
IL). The CompactFramework throws an error that the year
param is out of bounds.

The conversion in Win32 NLS APIs works automatically to
switch a Gregorian date to the date in another calendar
type, so what's up with the CompactFramework? Is there
some hidden trick to use here?

Thanks for any help here.

Elisha Berns
 
Which constructor did you use to construct the DateTime Object? Could you
post the sample code in which you tried this?

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top