my %dayhash = (0 => 'Sonntag', 1 => 'Montag', 2 => 'Dienstag', 3 => 'Mittwoch', 4 => 'Donnerstag', 5 => 'Freitag', 6 => 'Samstag'); while($ref = $sth->fetchrow_hashref()) { [...] my ($tsec,$tmin,$thour,$tmday,$tmon,$tyear,$twday,$tyday,$tisdst) = localtime($ref->{'time'}); $twday = $dayhash{$twday}; [...] }