Bodhi Freeway 2 Tutorials
Invalid argument to date encode

Problem: When using Bodhi Freeway 2 to debug your MetaStock data the 'invalid argument to date encode' error appears on exporting.

Solution: This is due to you having one or more corrupt MetaStock files. To determine which files are corrupted read the debug file, as per below. The last entry in the debug file will reference the corrupt file. After you have deleted/removed/repaired this file you will need to run the debug process again to ensure you have no further corrupted files.

    How to read the debug file:
    To determine which MetaStock files are corrupted you will need to view the debug file. To view this file, you will need to have WinZip installed on your computer.
  1. Exit out of this error and restart Bodhi Freeway 2.
  2. Open Winzip.
  3. Click Open.
  4. In the Look in box, navigate to your c:\Program Files\Infosoft\Bodhi2\User directory.
  5. Select the B2Bak32.zip file then click Open.
  6. Select the Debug.txt file (so it is highlighted) then click View.
  7. The file should open in either NotePad or WordPad (if the document is large). Use the Scroll bar (right of screen) to scroll to the bottom of the document.
  8. The last symbol mentioned in this file is the one that is corrupted. In this example, NCP is the corrupted file:
    12-Mar-2005 @ 4:30 PM Loading: NCP
    12-Mar-2005 @ 4:30 PM Done 1 times
    12-Mar-2005 @ 4:30 PM MSFL LockSecurity 0
    12-Mar-2005 @ 4:30 PM Done 1 times
    12-Mar-2005 @ 4:30 PM MSFL GetRecordCount 0
    12-Mar-2005 @ 4:30 PM Done 1 times
    12-Mar-2005 @ 4:30 PM MSFL ReadDataRec 0
  9. To find which directory this file resides in, scroll up the file until you find the reference to a Opening:
    12-Mar-2005 @ 4:29 PM Opening: MetaStock c:\My Databases\MetaStock\ASX\N