The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to compare the dates in shell script vaji Shell Programming and Scripting 9 02-28-2007 12:34 AM
compare dates ragha81 Shell Programming and Scripting 2 11-01-2006 06:17 PM
How to compare dates in C/C++ naan High Level Programming 1 08-28-2006 10:03 AM
How to compare two dates bankpro High Level Programming 5 01-24-2006 04:07 AM
compare two dates wchen Shell Programming and Scripting 6 10-24-2002 04:39 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-19-2007
i_priyank i_priyank is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 9
Unhappy compare dates...

hi all
how can in compare yyyy/dd/mm with yyyy/dd/mm in perl i want the result like grater than or less than the given date...
thanks in advance
  #2 (permalink)  
Old 09-19-2007
SanjayLinux SanjayLinux is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 58
Read given article

Please read this article: You will able to find answer for your question.


FAQBasicUsage - Perl DateTime Wiki


~~~Thanks~~~
Sanjay Tripathi
  #3 (permalink)  
Old 09-19-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
Quote:
Originally Posted by SanjayLinux View Post
Please read this article: You will able to find answer for your question.


FAQBasicUsage - Perl DateTime Wiki


~~~Thanks~~~
Sanjay Tripathi
The module DateTime is not part of standard packages.

Another alternative is to convert the dates to UNIX format (number of seconds elapsed since epoch) using time function, and then compare them. Check the documentation of time and localtime functions.
  #4 (permalink)  
Old 09-21-2007
i_priyank i_priyank is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 9
Quote:
Originally Posted by i_priyank View Post
hi all
how can in compare yyyy/dd/mm with yyyy/dd/mm in perl i want the result like grater than or less than the given date...
thanks in advance
GOT THE SOLUTION JUST REMOVE "/" FROM THE DATES AND "YYYYMMDD" IS NOW A SIMPLE NUMBER YOU CAN COMPARE IT WITH ANY OTHER NUMBER IN THAT FORMAT
Closed Thread

Bookmarks

Tags
perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0