in reply to DateTime formatting problem
$start_date->strftime("%m%d%y"); print $start_date;
strftime does not modify the invocant ($start_date) in any way. Rather it returns a string that is the result of formatting the invocant.
Since you throw away the result of calling ->strftime, and then print $start_date again in the next line, I guess you haven't fully understood this principle.
So the answer is to work with the return value of the ->strftime call, not with the original object.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DateTime formatting problem
by PerlSufi (Friar) on Apr 30, 2013 at 18:07 UTC |