http://www.jsankey.com/software/timesheet/timesheet.htm FWIW
ive got to each data field in each record
foreach my $k (@{$pdb->{"records"}})
{
foreach $key ( keys %$k )
{ print "key is $key: => $$k{$key} \n " ;}
}
there are 2 date/time fields and a text field
i can strip off the free text entry as $2
$str=~/(.+)ÿÿ(.+)/;
i cant find anything on how the date/time will be saved ( and how the
entries will be divided in the string $1)
Can anyone enlighten me - or point me to resource to convert from pdb
date format to something human-readable ?
is the hexdump that will contain a2 date/times .
The text after the ff ff is 'phone call '
>Im trying to write a little (perl) script extract data from a pdb
>file
>
>http://www.jsankey.com/software/timesheet/timesheet.htm FWIW
>
>ive got to each data field in each record
>
>foreach my $k (@{$pdb->{"records"}})
>{
>foreach $key ( keys %$k )
> { print "key is $key: => $$k{$key} \n " ;}
>}
>
>there are 2 date/time fields and a text field
>i can strip off the free text entry as $2
> $str=~/(.+)яя(.+)/;
>
>i cant find anything on how the date/time will be saved ( and how the
>entries will be divided in the string $1)
>
>Can anyone enlighten me - or point me to resource to convert from pdb
>date format to something human-readable ?
One format is a long integer with the year *10000 + the month * 100 +
the day of the month (from memory, YMMV).
Depending on what program created the pdb, you might find pdbconverter
useful: http://pdb-converter.en.softonic.com/palm
It can read most pdb files.
If it can't read your file, try the trial of pdbconverter pro:
http://www.mverive.com/pdbconverter.htm
John
i read somewhere that its year -1904 + 100*m +d
so it either
1 Dec 2008 = 2008*10000+12*100+1= 20081201 =&1326A31
or (2008-1900)*10000+12*100+1=1081201 =&107F71
or (2008-1904)*10000+12*100+1=1041201=&FE331
hexdump
p h o n e c a l l
95 b1 00 03 02 0d 00 02 03 b1 00 0b 03 c0 ff ff 50 68 6f 6e 65 20 43
61 6c 6c
id like to end up with the perl script doing all the conversion ,
automatically if possible
That sounds like Mac time format.
>hexdump
>
>p h o n e c a l l
>95 b1 00 03 02 0d 00 02 03 b1 00 0b 03 c0 ff ff 50 68 6f 6e 65 20 43
>61 6c 6c
>
>id like to end up with the perl script doing all the conversion ,
>automatically if possible
What is the actual date/time for the entry in hex?
The date/time seems to precede the text:
50 68 6f 6e 65 20 43 61 6c 6c is
P h o n e (sp) C a l l
with 20 being the space character
See http://www.asciitable.com/
John