I want to change a date from format dd-mmm-yyyy to mm/dd/yyyy. Is there a way to do this with sed or do you have to write a case statement to convert JAN to 01? Thanks (9 Replies)
How to convert the date field from dd/mm/yyyy to yyyy/mm/dd in unix
my script will generate text file which have two fields
one is date and another is name of the server for example this is sample date which I have to sort based on older to newer date the problem is when I found out sort will... (4 Replies)
I have a file with some date columns in MM/DD/YYYY format:
SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458|
And I want to convert the date format to:
... (5 Replies)
In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY.
Thanks. (8 Replies)
Hi All,
I am learning PERL for one of the projects, and in one of these scripts, I read a flat text file and print in the terminal.
The problem is, the text file has a date field. The format is yyyymmdd. I need to display this as dd-mon-yyyy.
Any ideas to do this? Thanks a lot for the... (9 Replies)
(Attention: Green PHP newbie !)
I have an online inquiry form, delivering a date in the form yyyy/mm/dd to my feedback form. If the content passes several checks, the form sends an e-mail to me. All works fine. I just would like to receive the date in the form dd/mm/yyyy. I tried with some code,... (6 Replies)
Hello,
I am writing a script that parses different logs and produces one. In the source files, the date is in DD MM YYYY HH24:MI:SS format. In the output, it should be in DD MON YYY HH24:MI:SS (ie 25 Jan 2010 16:10:10)
To extract the dates, I am using shell substrings, i.e.:
read line
... (4 Replies)
Hi I have a problem with Date format in my code.
1st I am trying to convert today's date to yesterday's using
YESTERDAY3=`perl -e '@y=localtime(time()-86400); printf "%04d/%02d/%02d",$y+1900,$y+1,$y;$y;'`
And once it is done I am trying to using the yesterday date in a grep command to... (3 Replies)
Hi All,
I have line
,A,FDRM0002,12/21/2017,,0.961751583,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
it contains date in mm/dd/yyyy format i want to change this to yyyymmdd format using perl.
Use code tags, thanks. (8 Replies)
Discussion started by: vishal0746
8 Replies
LEARN ABOUT DEBIAN
net::ripewhois::in
in(3pm) User Contributed Perl Documentation in(3pm)NAME
Net::RIPWhois::in - Perl extension for accessing inetnum objects from RIPE whois database.
SYNOPSIS
use Net::RIPEWhois::in
$in = new Net::RIPEWhois::in;
@in = getIn($whois, $prefix, $ALLOCOPT);
$whois->closeWhois();
DESCRIPTION
Get inetnum objects from RIPE whois server. Validate as allocation object.
METHODS
debug
Get or set the debug.
$in->debug(1); set the debug.
$in->debug(undef); turn off the $debug;
error
($errNo, $errMsg) = $in->error; $in->(undef, undef, true); reset the error message
Will get the last error no and error string;
if $whois->debug is set @{$in->{'errMsgAll'}} and @{$in->{'errNoAll'}} will have the list of all errors and error numbers.
new
$in = new Net::RIPEWhois::in
Creates a new inetnum object. ENV variables WHOISHOST and WHOISPORT
getIn
Return a list of inetnum objects returned by whois.
$whois = new Net::RIPEWhois;
@in = $in->getIn($whois, $prefix, $ALLOCOPT);
Selected attributes of inetnum are stored in data structure i<inetnum>. Should always query with fast raw output used by the RIPE whois
db.
$in->{inetnum}{attribute}
return undef on error. use $in->error() to get error no. and message.
splitWhoisAns
Split the response string from whois ans and return list of inetnum on sucess.
@inList = $in->splitWhoisAns( $whoisAnsRef);
Returns undef on error.
Spliting depending on fast raw output format from whois db. Use "-F" to get fast raw output.
validAlloc
Check the inetnum is an alloation or not.
Using netname same as regid, translated "." to "-" .
mnt-by RIPE-NCC-MNT ,RIPE-NCC-HM-MNT
status ALLOCATED PA, ALLOCATED PI, ALLOCATED UNSPECIFIED and not in IANA Delegated list. As specified in the specification when queried
"-L" "-T" in the range database should return max 3 inetnum objects. Assignment, Allocation & IANA delegation to RIPE. Skip if it is an
IANA delegation and aply the previous check.
@valid = $in->validAlloc(@inlist);
undef on error.
checkYYYYmmDD
Function used to check dates are valid or not. Converts to UTC on YYYYMMDD and concert back to date format if these to matchs treated ad
valid date.
$YYYYMMDD = checkYYYYmmDD($YYYYMMDD); Accepts YYMMDD and YYYYMMDD formats. YYMMDD is treated as 19YYMMDD
FILES
/ncc/ip-reg/delegations perl file with list of IANA delegations.
REQUIRES
perl module ipv4pack
AUTHOR
Antony <antony@ripe.net> software group RIPE NCC <softies@ripe.net>
SEE ALSO perl(1), Net::RIPEWhois(3), whois(1)perl v5.10.1 2003-07-28 in(3pm)