Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Calender billing_prt

by thezip (Vicar)
on Jan 23, 2014 at 21:36 UTC ( #1071826=note: print w/replies, xml ) Need Help??


in reply to Calender billing_prt

... but you haven't asked a question yet, or showed us the code that you're lost in...

BTW, take a look at line 38 -- it's missing a semi-colon.


*My* tenacity goes to eleven...

Replies are listed 'Best First'.
Re^2: Calender billing_prt
by oikool (Novice) on Jan 23, 2014 at 22:09 UTC
    #!/usr/local/bin/perl @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun); ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek +, $dayOfYear, $daylightSavings) = localtime(); $year = 1900 + $yearOffset; $theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$mont +h] $dayOfMonth, $year"; print $theTime;

    this the above code im using it to capture system pc time, i wasnt able to use this time as actually im working on Staf automation. So im writing this perl script so that i can capture the time and use it in my xml code which is required for the billing. I will use this PC time and later generate bill accordingly which i wasnt able to do.(if i subscribed to a plan on say today 24th, he should be billed next month 21st). But my client requirement is that they require the billing according to postpaid customers.

      ... and you're wanting to know how to do *what* ?

      Perhaps sprintf() might be your friend:

      my @parts = localtime(time); my $now = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $parts[5]+1900, $parts[4]+1, $parts[3], $parts[2], $parts[1], $parts[0]); print "The current date/time is $now.\n";

      *My* tenacity goes to eleven...
        i was asking how to call the system PC time that i have written in perl script and use it in the xml code .

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2018-11-20 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (229 votes). Check out past polls.

    Notices?