in reply to Date format YYYY-MM-DD HH-MM-SS

one of the ways to go
if you wish get your data into
the separate variables
@date = (localtime(time))[5, 4, 3, 2, 1, 0]; $date[0]+=1900; $date[1]++; printf "%4d-%02d-%02d %02d:%02d:%02d\n", @date;