my $s2="2016080100:00:00"; my $e1="2016123100:00:00"; my $format = '%dh %hd %hh %ht %yd'; $duyx1 =(DateCalc($s2,$e1)); $duyx1 = Delta_Format($duyx1,'2',$format); print "\nduyx1 = $duyx1\n";