I have a date in string as in $str1="20120704". I want to subtract 1 day from that date, and store the value of date as a string in $str2. How can i do it?
I have a date in string as in $str1=20120704 . I want to subtract
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is very similar to another question you asked a couple of days ago. So, unsurprisingly, the solution is also very similar.
Time::Piece and Time::Seconds have been part of the standard Perl distribution since version 5.10.0. You should use them.