Sponsored Content
Full Discussion: Date calculation script
Top Forums Shell Programming and Scripting Date calculation script Post 302507245 by Franklin52 on Wednesday 23rd of March 2011 09:44:33 AM
Old 03-23-2011
What have you tried so far?
This User Gave Thanks to Franklin52 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

date calculation program

Hi One of my vendor based tool is giving date in no. of days since 1900-01-01. So, I want to display in CCYYMMDD format. For ex:- Vendor based tool is giving as 38790 days since 1900-01-01 corresponding to12/sep/2006 Does anybody has the... (1 Reply)
Discussion started by: axes
1 Replies

2. Shell Programming and Scripting

Date Calculation

Hi experts, Can you please help me in calculating the future date using unix shell scripting.. for example lets say todays date is 29-sep-2008 i wanna calculate the date after 365 days... hence the date must be 29-sep-2009.. Quick response is appreciable. thanks in... (2 Replies)
Discussion started by: subhendu81
2 Replies

3. Shell Programming and Scripting

Problems with date calculation

Hello all. I'm writing a script that should work with some files being sure that them were created a concrete day (0, 1, 2 or 3 days before script execution). This task should be done under Solaris and Linux hosts with different versions (Solaris 8, 9 and 10, Suse 9 and 10) so I'm trying to make... (3 Replies)
Discussion started by: nefeli
3 Replies

4. Shell Programming and Scripting

Date time calculation

hello guys, I had been to many forums and many topics in this site as well for my question but did not get any solution. My question is how i can get y'day date with time stamp today is 20100729103819 and i am looking for output as 20100728103819. in simple words as we do in oracle sysdate-1... (4 Replies)
Discussion started by: lokaish23
4 Replies

5. Shell Programming and Scripting

Date calculation

I have to run a shell , only if file_a.txt is updated correctly before 1hr. that is, file_a.txt 2011_09_21__14:10:20 --> any format.. And the shell can be like, if ; then Run some shell update file_a.txt with (date now) fi how to do this ? (6 Replies)
Discussion started by: linuxadmin
6 Replies

6. Shell Programming and Scripting

Date calculation, a little different...

Hello eveyone, I am tasked to write an (n)awk script to calculate the days between dates. Now before anyone chastizes me on how many forums there are on date calculation, I have no seen one that takes into account the Julian calender as well. As most know, September of 1752 is when we (the US)... (2 Replies)
Discussion started by: csharp100
2 Replies

7. Shell Programming and Scripting

Date calculation

Hi I have this date 11:30:02-31.11.12 How to calculate date between this date and now? I like it printed like this: 31D 2H 1M if possible. (6 Replies)
Discussion started by: Jotne
6 Replies

8. Shell Programming and Scripting

How to do simple date (time) calculation in shell script?

Hi, I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes. For example... STARTTIME=whenever this script starts ./path/to/command.sh >>logfile.log TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Discussion started by: nbsparks
7 Replies

9. UNIX for Dummies Questions & Answers

Need help regarding date calculation

Hi All, I need to calculate the date for monday to friday. Say today is 10.oct.2014 then I need to calculate the date as 09.oct.2014. If today is 13.oct.2014 then I need to calculate the date as 10.oct.2014. If its 03.Nov.2014 then date calculated must be 31.oct.2014. Please help in in... (2 Replies)
Discussion started by: abhi_123
2 Replies

10. UNIX for Dummies Questions & Answers

Date calculation in UNIX

I want to automate change in 'from yyyy/mm/dd to yyyy/mm/dd' every month in a unix program. For example in this month 'from yyyy/mm/dd to yyyy/mm/dd' is 'from 2014/10/01 to 2014/11/01' next month it should be 'from 2014/11/01 to 2014/12/01' Can any one provide me the code for the above... (2 Replies)
Discussion started by: srinivas kasett
2 Replies
Time::gmtime(3pm)					 Perl Programmers Reference Guide					 Time::gmtime(3pm)

NAME
Time::gmtime - by-name interface to Perl's built-in gmtime() function SYNOPSIS
use Time::gmtime; $gm = gmtime(); printf "The day in Greenwich is %s ", (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ gm->wday() ]; use Time::gmtime w(:FIELDS; printf "The day in Greenwich is %s ", (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ gm_wday() ]; $now = gmctime(); use Time::gmtime; use File::stat; $date_string = gmctime(stat($file)->mtime); DESCRIPTION
This module's default exports override the core gmtime() function, replacing it with a version that returns "Time::tm" objects. This object has methods that return the similarly named structure field name from the C's tm structure from time.h; namely sec, min, hour, mday, mon, year, wday, yday, and isdst. You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your core functions.) Access these fields as variables named with a preceding "tm_" in front their method names. Thus, "$tm_obj->mday()" corresponds to $tm_mday if you import the fields. The gmctime() function provides a way of getting at the scalar sense of the original CORE::gmtime() function. To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package. NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this. AUTHOR
Tom Christiansen perl v5.8.0 2002-06-01 Time::gmtime(3pm)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy