in reply to Re^5: Date format
in thread Date format
Yes, I have already tried this(FMdd/FMmm/FMyyyy), it was not coming. I tried using the regex which was mentioned in the above chat, now it is coming but the issue is/ :, the leading zero in the time is also need to be removed.
Expected Output: 1/8/2018 5:58
Getting Output:1/8/2018 05:58
My code
while(my @field=$sth1->fetchrow_array){ my $col1=0; $field[19]=~ s!^0!!g; print"\t $field[19]"; $field[8]=$priority{$field[8]}; $field[7]=$priority{$field[7]}; $field[33]=$statusyn{$field[33]}; $field[17]=$status{$field[17]}; $field[14]=$statusyn{$field[14]}; $field[44]=$tkttype{$field[44]}; $field[32]=$statusyn{$field[32]}; my $arr_ref=\@field; # my $date = $arr_ref->[$datecol]; # $date =~ s/ //; $worksheet1->write_row($row1,0,$arr_ref); $row1++; }
Thanks,
JP
2018-09-08 Athanasius added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Date format
by hippo (Archbishop) on Sep 07, 2018 at 12:44 UTC | |
|
Re^7: Date format
by marto (Cardinal) on Sep 06, 2018 at 12:03 UTC |