Well, if you're bypassing Perl by letting the database server do all the importing, it's no wonder you can't use Perl functions :) What about preprocessing the file? Read each line, split it up, convert the date as you would have otherwise and put it back together. That or insert the data manually using DBI, but preprocessing will likely be both easier and faster.