Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

posix::strptime(3pm) [debian man page]

POSIX::strptime(3pm)					User Contributed Perl Documentation				      POSIX::strptime(3pm)

NAME
POSIX::strptime - Perl extension to the POSIX date parsing strptime(3) function SYNOPSIS
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = POSIX::strptime("string", "Format"); DESCRIPTION
Perl interface to strptime(3) FUNCTIONS
strptime ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = POSIX::strptime(string, format); The result for any value not extracted is not defined. Some platforms may reliably return "undef", but this is dependent on the strptime(3) function in the underlying C library. For example, only the following fields may be relied upon: my ($min, $hour) = ( POSIX::strptime( "01:23", '%H:%M' ) )[1,2]; my ($mday, $mon, $year) = ( POSIX::strptime( "2010/07/16", '%Y/%m/%d' ) )[3,4,5]; Furthermore, not all platforms will set the $wday and $yday elements. If these values are required, use "mktime" and "gmtime": use POSIX qw( mktime ); use POSIX::strptime qw( strptime ); my ($mday, $mon, $year) = ( POSIX::strptime( "2010/07/16", '%Y/%m/%d' ) )[3,4,5]; my $wday = ( gmtime mktime 0, 0, 0, $mday, $mon, $year )[6]; SEE ALSO
strptime(3) AUTHOR
Philippe M. Chiasson <gozer@cpan.org> Kim Scheibel <kim@scheibel.co.uk> REPOSITORY
http://svn.ectoplasm.org/projects/perl/POSIX-strptime/trunk/ COPYRIGHT
Copyright 2005 by Philippe M. Chiasson <gozer@cpan.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2010-07-16 POSIX::strptime(3pm)

Check Out this Related Man Page

Convert::NLS_DATE_FORMAT(3pm)				User Contributed Perl Documentation			     Convert::NLS_DATE_FORMAT(3pm)

NAME
Convert::NLS_DATE_FORMAT - Convert Oracle NLS_DATE_FORMAT <-> strftime Format Strings SYNOPSIS
use Convert::NLS_DATE_FORMAT qw(oracle2posix posix2oracle); my $strptime = oracle2posix($NLS_DATE_FORMAT); $NLS_DATE_FORMAT = posix2oracle($strftime); DESCRIPTION
Convert Oracle's NLS_DATE_FORMAT string into a strptime format string, or the reverse. Functions oracle2posix Takes an Oracle NLS_DATE_FORMAT string and converts it into formatting string compatible with "strftime" or "strptime". my $format = oracle2posix('YYYY-MM-DD HH24:MI:SS'); # '%Y-%m-%d %H:%M:%S' Character sequences that should not be translated may be enclosed within double quotes, as specified in the Oracle documentation. my $format = oracle2posix('YYYY-MM-DD"T"HH24:MI:SS'); # '%Y-%m-%dT%H:%M:%S' posix2oracle Takes a "strftime" or "strptime" formatting string and converts it into an Oracle NLS_DATE_FORMAT string. It is possible to create strings which Oracle will not accept as valid NLS_DATE_FORMAT strings. my $format = posix2oracle('%Y-%m-%d %H:%M:%S'); # 'YYYY-MM-DD HH24:MI:SS' EXPORT None by default. "oracle2posix" and "posix2oracle" when asked. SEE ALSO
DateTime::Format::Oracle. AUTHOR
Nathan Gray, <kolibrie@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2005, 2006, 2011, 2012 Nathan Gray This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-01-18 Convert::NLS_DATE_FORMAT(3pm)
Man Page

12 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help with perl while loop

Can anyone tell me why this program won't kick out when the time gets beyond time in the loop? sub showtime { local($format,$military)=@_; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); if ((! $military) &amp;&amp; ($hour &gt; 12)) {$hour-=12;} ... (2 Replies)
Discussion started by: methos
2 Replies

2. Programming

C time in milliseconds function.

I need a c function which return the time in: hour min sec and mil sec I am writing on unix os. (3 Replies)
Discussion started by: kamil
3 Replies

3. UNIX for Dummies Questions & Answers

how to read POSIX?

how to read POSIX? poe six or not? (3 Replies)
Discussion started by: robin.zhu
3 Replies

4. Shell Programming and Scripting

Perl: code efficiency for gmtime

I have the following Perl snippet: # get datetime @dt = gmtime(); $strdate = 1900 + $dt . addleadingzero(++$dt) . addleadingzero($dt) . addleadingzero($dt) . addleadingzero($dt) . addleadingzero($dt); # write to file $outfile = $strdate . ".txt"; getstore($url, $outfile) or die "Error:... (3 Replies)
Discussion started by: figaro
3 Replies

5. Shell Programming and Scripting

Perl - To print past 5 mins timestamp

hi , I would like to ask how to get past 5 minutes system time and date, if i have following to get current time. # get current time ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); $year = $year + 1900; $mon = sprintf ("%02s",$mon+1); $mday = sprintf ("%02s",$mday); $hour =... (1 Reply)
Discussion started by: rauphelhunter
1 Replies

6. AIX

Probléme pour agrandir LV et FS

Bonjour, Je travail sur un environnement AIX 5.3 et je n'arrive pas ŕ augmenter mon FS ni mon LV. J'utilise les commande suivante chfs -a size=+4G /home/guesting ou extendlv sybase5lv 4 et rien ŕ faire il me retourne que le maximum capacity est atteint au niveau du LV alors qu'il y a des PP de... (6 Replies)
Discussion started by: mosta
6 Replies

7. UNIX for Dummies Questions & Answers

Help with a script

Lets say I have a file suffixed with a year eg: test_file_2010.txt which has some 40 records So now, the requirement is, Since the file has the year "2010" suffixed, I just want to add a column say FY10 and under it everything else should be FY10 again(40 rows) FY!0(column) FY10 FY10... (9 Replies)
Discussion started by: saggiboy10
9 Replies

8. Shell Programming and Scripting

Perl help LocalTime in New Format

Hi, I'm new to perl scripting and am trying it out. I have a file written in the following format: myfile-MMDDYY where MM is the number of the Month; DD the Day and YY the last two of the year... (Apologies for dumbing this down; I'm trying to be clear). There is a new file put onto my... (2 Replies)
Discussion started by: Astrocloud
2 Replies

9. UNIX for Dummies Questions & Answers

[Solved] remove all files of 2010

Hi, how to use "rm" to delete only files from year 2010 ? Thank you. (2 Replies)
Discussion started by: big123456
2 Replies

10. Shell Programming and Scripting

comparing strings as ints

Hi, So I got his code below. $year is a string of 2010,2011 etc. I guess I want to convert $year to an integer so I can do my if statement to see if the year string is greater than 2010? Or how could I do this? Right now I get a syntax error doing this. if; then do stuff fi (2 Replies)
Discussion started by: vsekvsek
2 Replies

11. UNIX for Advanced & Expert Users

UNIX System Programming Certification Program

Hi, I was working in an IT firm. My stream was UNIX, C, C++. worked for an year and half and then left the job. there has been a gap of 2 years already and wanna get back again. i have some 6 more months to that. want to do some certification to help me get back. c,c++ are fine. unix system... (1 Reply)
Discussion started by: niaR
1 Replies

12. Shell Programming and Scripting

Add year to array in perl

Need assistance in perl scripting . Is there a logic that i can implement to check the current year and add to an array . ex Current year is 2014 . If 2014 is not present add this year to array . @yar = qw(2013 2012 2011); foreach (@yar){ print "Year: $_ "; } @yar = qw(2014... (6 Replies)
Discussion started by: ajayram_arya
6 Replies