Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Providing Fractions of a second to DateTime?

by ansh batra (Friar)
on Jun 12, 2012 at 14:32 UTC ( [id://975816]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Providing Fractions of a second to DateTime?
in thread Providing Fractions of a second to DateTime?

$dt = DateTime->new( year=>2003, month=>6, day=>12, hour=>7, minute=>22, second=>12, millisecond=>345, microsecond=>678, nanosecond=>901 );

this should also work and use $dt->millisecond() for your calculations
refer cpan

Replies are listed 'Best First'.
Re^4: Providing Fractions of a second to DateTime?
by tobyink (Canon) on Jun 12, 2012 at 14:35 UTC

    i think this should also work

    It doesn't.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      sorry tobyink my fault
      constructor doesnt support milli seconds and microseconds

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found