Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: Calender billing_prt

by oikool (Novice)
on Jan 23, 2014 at 22:09 UTC ( #1071830=note: print w/replies, xml ) Need Help??

in reply to Re: Calender billing_prt
in thread Calender billing_prt

#!/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.

Replies are listed 'Best First'.
Re^3: Calender billing_prt
by thezip (Vicar) on Jan 23, 2014 at 22:25 UTC

    ... 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 .

        I'm sure your XML code is a wonder to behold, but until you show it to us, it doesn't exist, and we can't help you with your date/time problem...

        *My* tenacity goes to eleven...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2022-12-08 13:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found