On Wed, 2002-02-20 at 11:26, Mason, Andrew wrote: > This is a concept question rather than a code question. > > I have a script which produces a simple report on some simple disk space > stats for servers I work with. > I thought it would be useful to put this information into a database on > a daily basis. This would allow me to then look at historic data. > > Currently I am inserting the date a character string. I have learned > that while I can do this I greatly limit my capabilities at the SQL end. > SQL7 uses a number to represent date and time. I am sure that Perl does > (or at least) can also treat numbers like this. > > Can anyone suggest what commands (or even modules) I should look up, > relating to dates and times and conversion between different formats (Ie > useful ones for manipulation vs human recognisable ones).
>From experience with SQL7 I would convert your character strings to iso dates first ie:10/12/2001 to 20011210 then SQL7 will be able to handle them assuming date is dd/mm/yyyy split /'/'/; print $2$1$0 etc then should be an easy import (yes very quick and dirty) > TAI > > &rw > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]