Sponsored Content
Full Discussion: Logic help with Scenario
Top Forums Shell Programming and Scripting Logic help with Scenario Post 302595044 by joshiamit on Thursday 2nd of February 2012 01:49:55 AM
Old 02-02-2012
Thanks for the response

Quote:
Originally Posted by methyl
What would May 2012 and Aug 2012 look like?

Why would one need this table?
May will look like this
Code:
5/5/2012 apr 2 N Y
5/5/2012 may 5 Y N
5/12/2012 may 0 N N
5/19/2012 may 0 N N
5/26/2012 may 0 N N
6/2/2012 may 5 N Y
6/2/2012 jun 2 Y N
Aug :
8/4/2012 jul 3 N Y
8/4/2012 aug 4 Y N
8/11/2012 aug 0 N N
8/18/2012 aug 0 N N
8/25/2012 aug 0 N N
9/1/2012 aug 6 N Y
9/1/2012 sep 1 Y N

Regarding 2nd point one will definatively need this table in year process where you load the dates which is refer in processes which runs throughout year.

Last edited by Scott; 02-04-2012 at 05:24 PM.. Reason: Code tags...
 

We Also Found This Discussion For You

1. Emergency UNIX and Linux Support

Help in below scenario

Hi, my file has the data like below: 11,231,ABCVAV 22,AAHJHAj22,hdsjkhdls 22,dhskjhdkshd 22,gdgkdkadh 11,232,dgsjgdjh 22,ghdskahdkja 22,shdkajshs 11,233,ddjs 22,dhjkahkd 22,hsajhaah 11,231,sjkjsjj 22,ahkh 22,hsakh From the above i need only the records which starts as 11,231... (5 Replies)
Discussion started by: pandeesh
5 Replies
Time::Seconds(3pm)					 Perl Programmers Reference Guide					Time::Seconds(3pm)

NAME
Time::Seconds - a simple API to convert seconds to other date values SYNOPSIS
use Time::Piece; use Time::Seconds; my $t = localtime; $t += ONE_DAY; my $t2 = localtime; my $s = $t - $t2; print "Difference is: ", $s->days, " "; DESCRIPTION
This module is part of the Time::Piece distribution. It allows the user to find out the number of minutes, hours, days, weeks or years in a given number of seconds. It is returned by Time::Piece when you delta two Time::Piece objects. Time::Seconds also exports the following constants: ONE_DAY ONE_WEEK ONE_HOUR ONE_MINUTE ONE_MONTH ONE_YEAR ONE_FINANCIAL_MONTH LEAP_YEAR NON_LEAP_YEAR Since perl does not (yet?) support constant objects, these constants are in seconds only, so you cannot, for example, do this: "print ONE_WEEK->minutes;" METHODS
The following methods are available: my $val = Time::Seconds->new(SECONDS) $val->seconds; $val->minutes; $val->hours; $val->days; $val->weeks; $val->months; $val->financial_months; # 30 days $val->years; $val->pretty; # gives English representation of the delta The usual arithmetic (+,-,+=,-=) is also available on the objects. The methods make the assumption that there are 24 hours in a day, 7 days in a week, 365.24225 days in a year and 12 months in a year. (from The Calendar FAQ at http://www.tondering.dk/claus/calendar.html) AUTHOR
Matt Sergeant, matt@sergeant.org Tobias Brox, tobiasb@tobiasb.funcom.com BalieXXzs SzabieXX (dLux), dlux@kapu.hu LICENSE
Please see Time::Piece for the license. Bugs Currently the methods aren't as efficient as they could be, for reasons of clarity. This is probably a bad idea. perl v5.16.2 2012-10-11 Time::Seconds(3pm)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy