- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Perl Script Help first day of the given weekn ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2013 05:53 AM
05-20-2013 05:53 AM
Perl Script Help first day of the given weekn in a year
Hello Forum,
I have text data for to manipulation. I get string like "201319" so "19" refers the week of the year 2013.
I wan to get the first day of this week (19).
Actually;here is my source.txt;
"SA4";"00000000000003";"0160";"001";"36.25402.6480";0000;2;;"Immediate";"Weekly";130519;"0";0;0;0;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Released";"Weekly";130203;"0";0;30;30;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;19;;"Planned";"Weekly";;"0";0;30;30;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;20;;"Planned";"Weekly";;"0";0;0;0;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";130501;"0";0;60;60;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";130601;"0";0;90;90;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";130701;"0";0;120;120;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";130801;"0";0;180;180;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";130901;"0";0;60;60;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;0;;"Planned";"Monthly";131001;"0";0;85;85;;;"SA4_END";
"SA6";"00000000000003";"0160";"001";"36.25402.6480";"09840190091";"";30;;;;;;;;;"SA6_END";
I have to go to the strings ;
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;19;;"Planned";"Weekly";;"0";0;30;30;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;20;;"Planned";"Weekly";;"0";0;0;0;;;"SA4_END";
Then get the final date as yymmdd from 19th week of 2013----->130506 (because the 19th week of 2013 is May and
the first day of the week is 06)
20th week of 2013----->130513---->(because the 20th week of 2013 is May and the first day date of week is 13th of May
Then I have to add these strings as below then save my source.txt
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;19;130506;"Planned";"Weekly";;"0";0;30;30;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;20;130513;"Planned";"Weekly";;"0";0;0;0;;;"SA4_END";
- Tags:
- date arithmetic
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2013 05:58 AM
05-20-2013 05:58 AM
Re: Perl Script Help first day of the given weekn in a year
I have to change these records as ;then save my source.txt
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;19;130506;"Planned";"Weekly";;"0";0;30;30;;;"SA4_END";
"SA4";"00000000000003";"0160";"001";"36.25402.6480";2013;20;130513;"Planned";"Weekly";;"0";0;0;0;;;"SA4_END";