Book a Demo

Author Topic: date of package equals 30.12.1899  (Read 3280 times)

Simon Hackfort

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
date of package equals 30.12.1899
« on: March 06, 2008, 10:58:27 pm »
Hi,

I coded some addin in C# and it works, but when I read out the package attribute called Modified in some cases I got the date 30.12.1899. In the Enterprise Architect property view I always see the right last modified date, which is not equal to 30.12.1899. By that way I also noticed that the time part of the dateobject are always 00:00:00.

Can somebody help me?
« Last Edit: March 06, 2008, 10:59:08 pm by spawn »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: date of package equals 30.12.1899
« Reply #1 on: March 06, 2008, 11:45:38 pm »
I've seen this occur before - not in EA, but in handling legacy data in .Net applications. The problem seems to occur when older Office applications - and other applications as well, but EA uses the Jet engine which definitely falls into this category - pass a date. If .Net does not ask for the date in an expected format it might trigger the legacy application to pass an empty date field. Older applications sometimes incorrectly count the century leap day - perhaps an early attempt at year 2000 compliance; some designers figured nobody needed to cross 1900 again - and you end up with December 30.

My suggestion is that you make sure that you are passing a date on both ends of the transaction. If Jet translates the date to a text field, or something like that, you're likely to see the problem you are encountering.

[It's been over a year since I last saw this, and I got it solved right away. I don't remember exactly what I did to fix it, but it was not much effort. You'll find it.]

David
No, you can't have it!

Simon Hackfort

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: date of package equals 30.12.1899
« Reply #2 on: March 07, 2008, 05:45:39 pm »
I did some debugs and found out that the wrong date will be mapped in the EA Repository object. So I think something goes wrong at reading out the value from eap file through the com lib. At the moment I have no idea how to fix this, but I need the right values of modified date.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: date of package equals 30.12.1899
« Reply #3 on: March 08, 2008, 12:00:17 am »
Send this to Sparx support. Include the code you are using, as well as a zipped project where this happens.
No, you can't have it!