Register  |  Login

DeepWave

On the Internet since 1993

Convert your PalmOS Calendar to iCal

Posted at 12:39 pm Sat, 31 Mar 2007 by Patrick,  Trackback URL  |  Page RSS Feed
Posted in Stuff with Tags: , ,

Modern versions of Palm Desktop keep your data in highly proprietary databases and file formats. In order for it to be of any use to you, you will have to convert the data to something more "industry standard". In this example, we will convert Palm Desktop’s Calendar (PD version 4.1.4) into the iCal format, which is much more popular with other email programs, PIMs, mobile phones and websites.

It should be noted that I have tried to detail my steps as much as possible, but, this procedure is not for the faint of heart. Some computer knowledge is a minimum, including Windows command lines, various applications, and Microsoft Excel/OpenOffice.org Calc. Perhaps most important is good knowledge of Find/Search and Replace functions of your favorite text editor and lots of patience for trial and error. Some other caveats include the fact that repeating events are not handled well (if at all) and these instructions are Windows specific, but I’m sure you can adapt them for Mac and Linux platforms.

So, backup all your data at every step, and follow the instructions below carefully. It worked for me, and if it works for you, then you too can achieve "data portability" - YMMV

Part A - Get the data out of your Palm and Palm Desktop
Step 1. Make sure you have HotSynced your Palm with your Palm Desktop to make sure the data is up to date. If you have difficulty HotSyncing your Palm, make sure you check Fixing HotSync Problems.

Step 2. From the Palm Desktop, click on "Calendar".

Step 3. From the Menu > "File" > "Export".

Step 4. In the "Export As" box, make sure you select "All Records" and "Datebook Archive (.dba)" as your "Export Type". Note that "Calendar Archive" is also a .dba file, but be warned, the file extension may be the same, but the internal file format is very different.

 
Part B - Convert from "Datebook Archive" (DBA) to "Palm CSV" (CSV)
Step 1. Download the datebook_csv.zip package and unzip it to the same folder as your Datebook Archive.

Step 2. Open a Command prompt and navigate to the folder containing the DTBK2CSV.EXE from the datebook_csv.zip package and your Datebook Archive

Step 3. Set your time zone, usually it is a three letter code followed by a modifier from GMT. For example, Singapore is SST-8, while US Eastern is EST+5. To know more about setting your timezone information, you can check out the GNU C Library.

Step 4. Run the conversion program with the following command line:

    DTBK2CSV.EXE -i<your-dba-file.dba> -oOutput.csv -d2

Step 5. You should now have a converted "Palm CSV" file. Below is a screenshot of my own conversion of 1700+ Calendar records over 9 years from 1998 to 2007.

 
Part C - Convert from "Palm CSV" (CSV) to "Outlook CSV" (CSV)
Unfortunately, at this stage, it becomes complicated. The "Palm CSV" does not use a common enough CSV table structure. We will need to convert to the Microsoft Outlook CSV structure, which is more common. It is important to note that the "Palm CSV" has the following table structure:

    "Date","Start","End","Hours","Description"

but the "Outlook CSV" has the following more complex table structure:

    "Subject","Start Date","Start Time","End Date","End Time","All day event","Reminder on/off","Reminder Date","Reminder Time","Meeting Organizer","Required Attendees","Optional Attendees","Meeting Resources","Billing Information","Categories","Description","Location","Mileage","Priority","Private","Sensitivity","Show time as"

Clearly some work is required! To convert your "Palm CSV" into an "Outlook CSV", you must open your CSV in MS Excel or OpenOffice.org Calc. For this explanation, I will use Excel as the example. I assume you know enough about Excel/Calc to be able to create columns, Search/Find and Replace, move data around, reorganise table structures and import/export CSVs.

Step 1. Open your CSV in Excel.

 
Step 2. Be careful about "Descriptions" that are more than one line long, try to edit them to keep them all in a single line. Look out also for any "misformatted" lines in Excel during the CSV import. This is usually caused by "Descriptions" that have commas in them and are mistaken by Excel to mean the next column over. Edit them so that they are all placed in the proper columns.

Step 3. Watch out for all dates that are 100 and above. These need to be edited to reflect the year 2000 and above. Year 100 would be 2000, 101 would be 2001, 102 is 2002 and so on.

Step 4. You need to make sure that your "Date" is in the correct format. Click on the "Date" column and choose Menu > "Format" > "Cells". Choose "Custom" and "dd/mm/yyyy" as the "Type" (type in the type if you can’t find it).

Step 5. You need to make sure that your "Start" and "End" time is in the correct format. Click on the "Start" and "End" columns and choose Menu > "Format" > "Cells". Choose "Custom" and "h:mm:ss AM/PM" as the "Type" (type in the type if you can’t find it).

Step 6. Move the "Description" to the first column, and rename it "Subject".

Step 7. Delete the "Hours" and "Client" columns, they are not needed.

Step 8. "Start" becomes "Start Time" and "End" becomes "End Time".

Step 9. "Date" becomes "Start Date"

Step 10. Copy "Start Date" and paste it as "End Date" between "Start Time" and "End Time". If your event crosses the 11 midnight boundary, you will have to check/edit the "End Date" and "End Time" by hand to make it correct.

Step 12. You can then create the remaining columns, from "All day event" to "Show time as".

Step 13. For the data in the new fields, "All day event", "Reminder on/off" and "Private" can be set to "FALSE" while it should be safe to leave the rest blank. Alternatively, you can edit as needed.

 
Step 14. Next, go to Menu > "File" > "Save As" and choose "CSV (Comma delimited) (*.csv)" as the file type and save the file.

Step 15. Now, here comes the really difficult part! You must open the CSV file in a text editor and make sure there are quotes before and after each field string, including the header line. If you do not do this, you will not be able to proceed to the next step. Here is an example of some wrong strings:

    Subject,Start Date,Start Time,End Date,End Time,All day event,Reminder on/off,Reminder Date,Reminder Time,Meeting Organizer,Required Attendees,Optional Attendees,Meeting Resources,Billing Information,Categories,Description,Location,Mileage,Priority,Private,Sensitivity,Show time as
    Attend IT Course,11/11/2006,9:00:00 AM,11/11/1999,5:00:00 PM,FALSE,FALSE,,,,,,,,,,,,,FALSE,,
    Sales Meeting,06/12/1999,12:00:00 AM,06/12/1999,12:00:00 AM,FALSE,FALSE,,,,,,,,,,,,,FALSE,,

Here are the correct strings:

    "Subject","Start Date","Start Time","End Date","End Time","All day event","Reminder on/off","Reminder Date","Reminder Time","Meeting Organizer","Required Attendees","Optional Attendees","Meeting Resources","Billing Information","Categories","Description","Location","Mileage","Priority","Private","Sensitivity","Show time as"
    "Attend IT Course","11/11/1999","9:00:00 AM","11/11/1999","5:00:00 PM","FALSE","FALSE","","","","","","","","","","","","","FALSE","",""
    "Sales Meeting","06/12/1999","12:00:00 AM","06/12/1999","12:00:00 AM","FALSE","FALSE","","","","","","","","","","","","","FALSE","",""

 
Clearly, you need to have a strong grasp of Search/Find and Replace and some good typing skills. If you know how, you can use Excel to add extra columns with the quotes and do a lot more search and replace in the text editor at this stage. Check carefully and clearly. Wrongly formatted lines will fail to pass the next step!

Part D - Convert from "Outlook CSV" (CSV) to iCal Format
This last step requires you to download a program called Sunbird. You should use Version 0.2 of Sunbird (Yes, I know about Sunbird 0.3+ and Lightning, etc, but if you want iCal, you better stick to 0.2). You can download Sunbird 0.2 from Mozilla’s website.

Step 1. Unzip Sunbird 0.2 into a folder on your PC.

Step 2. Go to the Sunbird folder, and double-click on "sunbird.exe" and Sunbird will run.

Step 3. From the Menu > "File" > "Import", make sure you select "Outlook Comma Separated" as the file type and choose your "Outlook CSV" file.

 
Step 4. Sunbird will ask you about the field mapping, make sure that the fields are mapped correctly - if you had done all the text editing correctly, it should be fine to just hit "OK".

 
Step 5. There may be some complaints about date formats, but it should be fine to just hit "OK".

Step 6. You should now see a box saying that Sunbird will import "XXX new event(s)". If this number does not match your CSV file, this means that one or more lines of data is not formatted properly. Hit cancel and edit the "Outlook CSV" file and make sure the quotes, commas and lines are all correctly formatted. Below is my import of 1700+ events.

 
Step 7. After "Import All" completes, you should check to see all your events are there. Note that if you left "Reminder on/off" as blank instead of "FALSE" in the earlier steps, you will have a lot of alarms trigger right after the import is complete. The first time I did this, I had 1700+ alarms trigger in one go. Luckily, Sunbird has a "Dismiss All" button.

Step 8. If everything is OK you can exit Sunbird. Edit as needed if it is not.

 
Step 9. Go to the "C:\Documents and Settings\<your-name>\Application Data\Mozilla\Sunbird\Profiles" where <your-name> is your user name. In this folder, you will see a folder with some strange numbers and letters, like "55xb6j40.default". Browse into it, followed by the "Calendar" folder. You should now be able to see a file called "CalendarDataFile.ics". Copy this file somewhere safe.

Step 10. You can now uninstall Sunbird by deleteing the whole sunbird program folder and the "C:\Documents and Settings\<your-name>\Application Data\Mozilla\Sunbird" folder.

Congratulations, you have now converted your proprietary Palm Calendar into a more common iCal file which is more commonly supported by other software and systems.

34 Responses to “Convert your PalmOS Calendar to iCal”

  1. HM Says:   

    great work on getting a workpath going into migrating palm datebook into a open standard. wrote a perl script to add and audit the delimiters. making step15 just a simple step.

  2. art Says:   

    Hi there, when I try to run the conversion program, I get this error message: “Error: Unable to malloc 20000 bytes”, ¿Do you know what´s happening?, Thanks a lot.

  3. stefantesch Says:   

    if you use linux with a kde desktop, you can simply transfer the data from your handhelt to the kde pim application and automatically your calendar is in a proper .ics format (the kde pim can easily im port & export this file type)

  4. Mr.Pink Says:   

    This looks like a very nice Howto, but i get no error and no records? starting DTBK2CSV.EXE with the correct syntax ??

  5. Louis Says:   

    Too many steps to do this… I gave up on step 13 on the first part…

  6. Reva Says:   

    got error message:

    Error: Couldn’t open inputfile test.dba

    saved file as date book archive (.dba)

    using Palm version 4.1.4

  7. Bruce Says:   

    I tried the datebook_CSV.EXE but it only appears to export tthe header for the Palm columns and does not output any data???

  8. Patrick Says:   

    Unfortunately, most of the SW used here was not written by me, and source is not available, so I can’t even begin to figure out what some of the errors/problems are. Ultimately, the Palm OS Datebook format is a closed, proprietary format, and no official documentation exists on how this format is structured. So in a way, if it works for you, consider yourself one of the lucky ones.

  9. Flo Says:   

    Thanks for this guide, it worked for me with my 1000+ events (even if I imported the CSV directly into my Google Calendar).

    One thing others should keep in mind - the output is not so accurate as you may exspect:

    * All repeating events (congresses, lectures, …) are single events now
    * All “fullday” events (e.g. birthdays) where one day ahead

    Flo

  10. Neil Says:   

    For the faint of heart, you can also use Dba2Csv (http://www.dba2csv.com) to take you up to Part D…

  11. Peter Says:   

    Hi, is there something for Linux?

  12. Patrick Says:   

    Hi Peter, sorry, no linux versions of dtbk2scv.exe that I could find. That was my first choice actually - a linux CLI. I do hear Kpilot on KDE may be helpful though also, see stefantesch’s comments above

  13. Bob Says:   

    Regarding using Linux to translate as stefantesch noted, Gnome-based distros will also provide this. Evolution, the mail/calendar app typically included, will sync with Palm devices via gnome-pilot and export to iCal format.

  14. Kevin Says:   

    My datebook was over 20000b so it would not convert it to CSV it gave a malloc error, is there any fix for this?

  15. Chris Says:   

    I have the same problem with malloc. My guess is that malloc is failing because of the memory that’s allocated for a command window. In some ways, could the old memory limitations of DOS be somehow emulated within a command window? Is there some way to expand the memory allocation to the command window. One would think a program could allocate 20 thousand bytes of memory on a computer with nearly a billion bytes of RAM!

  16. Lia Says:   

    I am having the same problem with malloc: I get the message unable to malloc 20000 bytes. My datebook file is 3505965 bytes, a collection of 10 years of events.
    Is there a way I could recompile the program DTBK2CSV.EXE to allow more memory?

    The Palm desktop won’t let me sync any more because it says I have too many events.
    I have exported all the calendar entries to a datebook-format .dba file, but I would like
    to search that data someday.

  17. Carol Says:   

    Thanks for this effort. I really appreciate the detailed instructions & screen prints (good documentation is so hard to find).

    This seems to expect the input file to be called Calendar.dba. When I tried other names, it could not find the input file. It also had problems with paths that do not conform to the old DOS standards of a maximum 8 characters for each segment, no embedded spaces or special characters, etc. Both of these are consistent with the date that the program says it was last compiled: September 17, 1998 (think “before Win2k” or even before Y2K). And yes, malloc is indeed a C command used to allocate memory needed by the program, something commonly done by programs at that time.

    That said, it did not work for me, either. It displayed “0 records” but then seemed to get hung up. Or perhaps I did not wait long enough?

  18. Dennis Says:   

    i also get a malloc problem

  19. Patrick Says:   

    For all those who get a malloc problem, I’m sorry I can’t help since I don’t have the source code to the program. It isn’t mine and I don’t know who the original author is either.

    But one suggestion I have if you are faced with a very large DB and see this malloc() error is to try to export your calendar in “chunks” - ie. 1985 - 1989, 1990 - 1995, 1996 - 2000, etc.. After you have processed the individual “chunks” into CSVs, you can join them together in your favourite spreadsheet. Oh yes, by the way, spreadsheet software may also have a limit on how many rows (aka DB entries) you can have in a single spreadsheet.. I think older versions of Excel is 65536, meaning you cannot have more than 65536 DB entries in a single CSV.. Good luck..

  20. Palm to Open Source « For Now Says:   

    [...] provides excellent documentation for a laborious manual process: Export to DBA, DBA to CSV, fixing the table structure (a 15 steps version), and finally CSV to [...]

  21. ConCorDe_4590 Says:   

    Hello all

    I find that, I try it work perfectly !

    http://fornow.wordpress.com/2009/01/08/palm-to-open-source/

    Have a nice day !

    PS : Just to transfert (just for me) your calendar from palm to google calendar, afterward, I synchonize Lightning !
    Good Good !

  22. Marie Ferro Says:   

    Patrick, your solution sounds great but as I started it I then realized with Vista and a 64 bit machine your program won’t run. Do you have a solution for my situation? Thanks for your help.

  23. n8 Says:   

    i had the misalloc error too, and after dividing up the dba file i couldn’t get the dtbk2csv to work on the smaller files. i guess there is some secret pixie dust in the dba that eluded me.

    one option: if you want to settle on only the last 12 months of calendar, the airset instructions here are painless!!! and the conversion works very well. http://www.neff.ca/index.php?option=com_content&task=view&id=8

  24. Marie Ferro Says:   

    do you have a 64-bit version of this program? It looks like it is just what I need but my PC running Vista is a 64-bit machine. thanks

  25. newPreOwner Says:   

    Two years and four months after your posting, I found it encouraging as I embarked on a mission to convert data from Palm Desktop to Google Calendar to sync with my new Palm Pre. The information you provided showed that the process of converting your data manual is daunting, but something that others are doing successfully. I found the part about converting the CSV headers in excel the most useful. Re-inserting commas into the CSV took a bit of patience, but I have my data how I need it now. Thanks. If any Pre owners stumble upon this page who are looking to migrate from Palm Desktop, I recommend checking out Dimex 3.0 for exporting calendars with categories in tact ($19), evernote (free), and toodledo.com.

  26. Jeff Says:   

    Whatever you do, don’t use DBA2CSV. It’s a horrible program that doesn’t actually convert anything to CSV. It forces you to migrate your calendar data to Google Calendar with no explanation of why. Additionally, the software frequently returns “failed to connect to the internet” thus making your migration impossible. Don’t waste your money on this fraudulent piece of junk.

  27. Neil Says:   

    @Jeff

    You clearly didn’t read the website for Dba2Csv, and you certainly didn’t ask for any online help. It is made quite clear on http://www.dba2csv.com that Palm Desktop 6 files cannot be converted to CSV - and there is no reason to do so. If Dba2Csv “forces” you to migrate to Google, it is because this is a BETTER WAY to create an .ical file, or sync with any mobile device/software.

    For some unknown reason, Palm Desktop 6 exports in a completely different format than Palm Desktop 4, but both use the same file extension! To cope with this confusing situation Dba2Csv will open ANY .dba file and use the best method for moving your data to wherever you need it.

    As for not “wasting your money”, I provide unlimited online help, and a 100% refund if users are unhappy! In two years and 2000 users I’ve only had to refund a handful, almost always to users such as yourself who don’t bother to RTFM

  28. David Says:   

    Roland Scherrer makes dba2ics.exe (part of iCal4OL - 15 EUR) which can take the raw DateBook.mdb file directly from Palm Desktop and output an ICS file - even with category filter so that you can have the category you want extracted from the MDB-file. I’ve imported each of my categories into seperate Google Calendars and it works like a charm.

    If you export to DBA you’ll loose categories AFAIK - that’s why it better - and easier - to use the DateMook.mdb

    The program can be downloaded / bought here http://ical.gutentag.ch

  29. Doug Wallace Says:   

    I’m trying to go the other way. I’ve got a very old, but faithful Palm III C I still use (it works and I have no need to replace it) and I want to get my Outlook calendar files (ICS Format) into VCS format to import into Palm Desktop 4.1.4. Is there any tool you are aware of that will allow me to do this? I’ve found a few ‘free’ web based tools, but they always produce a file that won’t import properly and I get an error. Any help (other then buy a new Palm you cheapskate) would be very much appreciated. Thanks in advance for your response.

    Regards,
    Doug

  30. How to transfer calender from Palm to Droid - Droid Forum - Verizon Droid & the Motorola Droid Forum Says:   

    [...] your data off of your Palm, you should export it to an .ical file. I found this, with a Google: DeepWave Convert your PalmOS Calendar to iCal __________________ 640k’s DROID Hints: DROID Hints: Google Calendar Sync DROID Hints: POP3, [...]

  31. g Says:   

    for mac user
    try this one
    really easy

    http://www.palm.com/us/support/downloads/pre/migration/exportical.html

  32. migrating from palmOS - Android Forums Says:   

    [...] of info that may be useful: Can I import my Palm Desktop Calendar to Google - Calendar Help DeepWave Convert your PalmOS Calendar to iCal Some of my approach was gleaned from a chap called David, from his blog: Palm to Open Source For [...]

  33. kmoser Says:   

    There’s an online converter here that converts Palm calendar/datebook archive files (.dba format) to CSV:

    http://www.kmoser.com/palm2csv/

    Nothing to download or install, and it’s free.

  34. Kevin Says:   

    I’m really not having any luck finding a way to do this now. I have 64b windows 7, and palm desktop 6.2.2
    This command line program will not run on 64 bit windows. Other programs and the yahoo method appear not to work with palm desktop 6.2.2 Palm2Google gives a microsoft.jet.oleDb.4.0 not registered error, and the site has no info on a solution, just asks for info from me. Also I’d like to not pay a full price for a software I will use only once.

Leave a Reply