Hello all. I was hoping I could rack some professional minds about modifying some code. I'm not a programmer, but can read some languages to an extent and make simple mods, but I really need some help on this one.
I have a conversion that would take an 8 digit number for a birthday, YYYYMMDD and rearrange it to MMDDYYYY.
Original code:
What I'm facing now is a change in the file layout that I convert. I need to change the format (M)M/(D)D/YYYY to my usual MMDDYYYY. The parantheses are only there if it is actually a two digit date, so I need to convert 1,2,3 to 01,02,03 etc. I am also faced with the problem of the "/" character and need to get rid of that.
Appreciate any help.
-J
I have a conversion that would take an 8 digit number for a birthday, YYYYMMDD and rearrange it to MMDDYYYY.
Original code:
Code:
my ( $year, $date ) = unpack( qq{A4 A4}, $revBirthDate );
$birthDay = ( $date . $year );
What I'm facing now is a change in the file layout that I convert. I need to change the format (M)M/(D)D/YYYY to my usual MMDDYYYY. The parantheses are only there if it is actually a two digit date, so I need to convert 1,2,3 to 01,02,03 etc. I am also faced with the problem of the "/" character and need to get rid of that.
Appreciate any help.
-J