Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [olivers] How to transform date input?

Quote Reply
Re: [olivers] How to transform date input? In reply to
I've now added 3 date fields to the plugin user config and used this sub:

Code:
sub modify_record {

my ($home) = @_;
my $cfg = Dbsql::Plugins->get_plugin_user_cfg ('PluginName');
$home->{cgi}->{$cfg->{date_col_name1}} = GT::Date::date_transform($home->{cgi}->{$cfg->{date_col_name1}},$cfg->{orig_format},$cfg->{new_format}) if ( defined($cfg->{date_col_name1} and $home->{cgi}->{$cfg->{date_col_name1}}) );
$home->{cgi}->{$cfg->{date_col_name2}} = GT::Date::date_transform($home->{cgi}->{$cfg->{date_col_name2}},$cfg->{orig_format},$cfg->{new_format}) if ( defined($cfg->{date_col_name2} and $home->{cgi}->{$cfg->{date_col_name2}}) );
$home->{cgi}->{$cfg->{date_col_name3}} = GT::Date::date_transform($home->{cgi}->{$cfg->{date_col_name3}},$cfg->{orig_format},$cfg->{new_format}) if ( defined($cfg->{date_col_name3} and $home->{cgi}->{$cfg->{date_col_name3}}) );
return @_;
}

I'm now looking for a solution for the modify_form thingy. Any hints?

Cheers,
Oliver
Subject Author Views Date
Thread How to transform date input? Armin 4075 Dec 5, 2002, 5:18 AM
Thread Re: [Armin] How to transform date input?
Inertia 4004 Dec 5, 2002, 12:18 PM
Thread Re: [Inertia] How to transform date input?
Armin 3979 Dec 5, 2002, 1:58 PM
Thread Re: [Armin] How to transform date input?
jean 3978 Dec 5, 2002, 3:28 PM
Post Re: [jean] How to transform date input?
Armin 3972 Dec 6, 2002, 12:16 AM
Thread Re: [jean] How to transform date input?
olivers 3642 Jun 1, 2004, 2:16 AM
Thread Re: [olivers] How to transform date input?
olivers 3633 Jun 1, 2004, 2:59 AM
Thread Re: [olivers] How to transform date input?
olivers 3588 Jun 20, 2004, 12:10 PM
Post Re: [olivers] How to transform date input?
olivers 3580 Jun 21, 2004, 8:39 AM