• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Date formats (How to)

Hi.....
Can anyone give me some samples on Date manipulation....
I need to get just the date and then the time.
21/11/98
18:35
regards
0
rickyr
Asked:
rickyr
  • 3
  • 2
1 Solution
 
b2piCommented:
There are thousands of ways....

Try looking first at

perldoc -f localtime

That will show you that you can do

( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime;
$mon++;
$date = "$mday/$mon/$year";
$time = "$hour:$min";

If you need more flexibility than that, take a look at Date::Calc and Date::Manip


0
 
rickyrAuthor Commented:
Thanx v.much.
incidentally, as a freebee question. perldoc doesn't work.
How do I install it????????
Thanx again.
0
 
b2piCommented:
is perl on your path?
0
 
b2piCommented:
is perl on your path? If so, perldoc should be also.  What happens when you run it? (Does activeState include perldoc???)
0
 
rickyrAuthor Commented:
Hi......
/usr/local/bin wasn't in my path, There was a symbolic link for perl in /usr/bin, thats  how perl was indirectly in my path, but the full disribution wasn't.
thanks again.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now