Re^3: DateCalc using Date::Manip
by huck (Prior) on Jan 10, 2017 at 12:00 UTC
|
my $dtopt= DateCalc($dt1,$dt2,1);
or maybe these will work
my $dtopt= DateCalc($dt1,$dt2,'semi');
or
my $dtopt= DateCalc($dt1,$dt2,'approx');
| [reply] [d/l] [select] |
|
did you try
my $dtopt= DateCalc($dt1,$dt2,1);
output is
0:4:4:2:0:0:0
or maybe these will work
my $dtopt= DateCalc($dt1,$dt2,'semi');
0:4:4:2:0:0:0
my $dtopt= DateCalc($dt1,$dt2,'approx');
0:4:4:2:0:0:0
I am looking for the output as
+0:0:+21:5:1:0:0
I am really sorry this is not my code.I am trying the fix old code after the version updates.
Many Thanks,
| [reply] |
|
print Delta_Format($dtopt,'semi','+%yv:%Mv:+%wv:%dv:%hv:%mv:%sv');
based on the code from Krambambuli above but using semi
| [reply] [d/l] |
|
|
|
Re^3: DateCalc using Date::Manip
by LanX (Saint) on Jan 10, 2017 at 11:43 UTC
|
You haven't answered my questions.
A) correct output?
B) Version numbers
> so it caters for the below output
Do you even know what it means?
| [reply] |
|
To add to my previous reply regarding the correct output as on the old server with old version of Datemanip is
+0:0:+21:5:1:0:0
With the new server and new version of Date Manip(6.14)
The output which i get is below
the code that i use on the new server is
my $s1="2016040100:00:00";
my $e1="2016123100:00:00";
$dbyx1 =(DateCalc($s1, $e1));
$dbyx1 = Delta_Format($dbyx1,'0','+%yv:%Mv:+%wv:%dv:%hv:%mv:%sv');
print "\ndbyx1 = $dbyx1\n";
Output
+0:0:+0:0:3648:0:0
I hope i am being clear.
Many Thanks,
T
| [reply] [d/l] |
|
You were using different code (this includes Delta_Format ) AND time stamps ( 04 vs 08 ) on different servers without telling us.
The output you are showing now is also different from the original post. 3648 vs 6576
And you have no clue what the output you are requesting means (keyword "weeks")
In total: You are wasting our time because you are to lazy or to ignorant to ask a proper question.
Sorry, I'm afraid I can't help you ...
Update
3648h/24 are 152 days now but the code doesn't calculate the diff between 5 month anymore... oO
| [reply] [d/l] [select] |
A reply falls below the community's threshold of quality. You may see it by logging in.
|
|
The correct output as of now on the old server is
+0:0:+21:5:1:0:0
Version number for dateManip is 6.41
I hope it helps.
R,
| [reply] |
|
Don't you think the correct output and version number of the new server is of interest too?
Hope it helps.
| [reply] |
|
I reckon its 21 months and 5 days
| [reply] |
|
| [reply] |
|
|
|
| [reply] |