Hi all!
I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.
Thanks (2 Replies)
hii all.
I have to get the date of the 7th day past from the current date.
if i give the current date as sep 3 then i must get the date as 27th of august.
can we get the values from the "cal" command.
cal | awk '{print $2}' will this type of command work.
actually my need is
if today is... (17 Replies)
Hi all,
I have a variable where it has a past date value in the format YYYY-MM-DD
eg->
pcontromModate="2008-11-31"
How can i get the date 1 day before the pcontromModate.
The required date is 2008-11-30. ..Plz reply since its an urgent one (2 Replies)
Dear all,
I have 2 questions.
I have a file with many rows which has date of the format YYYYMMDD.
1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too.
2. After converting the date to... (10 Replies)
Can I print the date of a specific date?
Let say, today is 20 and I want to print in date format the day 14
I know that I can do this:
date --date='last Mon'
but
How can I do this?:
date --date='last 14'
?? (7 Replies)
hi all..
i want 2 know how 2 find 7days past date from current date..
when i used set datetime = `date '+%m%d%y'` i got 060613..
i just want to know hw to get 053013..
i tried using date functions but couldnt get it :( i use c shell and there is no chance that i can change that ..... (3 Replies)
I have a list of time spans in seconds, and want to compute the time span
as hh:mm:nn
I am coding in bash and have coded the following. However, the results are
wrong as "%.0f" rounds the values.
Example:
ftm: 25793.5
tmspan(hrs,min,sec): 7.16 429.89 25793.50
hh: 7
mm: 10
ss:... (2 Replies)
Hello,
How can we convert date like format 20181004171050 in seconds ?
I can able to convert till date but failing for HHMMSS.
date -d "20181004" "+%s" output as 1538596800 .
But when i add hhmmss it is failing date -d "20181004172000" "+%s" result Invalid date
Kindly guide.
Regards (16 Replies)
Hello everyone,
I calculate in my bash script the different between two timestamps in seconds. The next step would be to get the difference in minutes, and there is my Problem:AnzahlUeberstunden=$(( $(date -d "$JAHR-$MONAT-$TAG $ArbeitEnde" +%s) - $(date -d "$JAHR-$MONAT-$TAG... (6 Replies)
Discussion started by: Chaos_Lord
6 Replies
LEARN ABOUT CENTOS
time
TIME(2) Linux Programmer's Manual TIME(2)NAME
time - get time in seconds
SYNOPSIS
#include <time.h>
time_t time(time_t *t);
DESCRIPTION
time() returns the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
If t is non-NULL, the return value is also stored in the memory pointed to by t.
RETURN VALUE
On success, the value of time in seconds since the Epoch is returned. On error, ((time_t) -1) is returned, and errno is set appropriately.
ERRORS
EFAULT t points outside your accessible address space.
CONFORMING TO
SVr4, 4.3BSD, C89, C99, POSIX.1-2001. POSIX does not specify any error conditions.
NOTES
POSIX.1 defines seconds since the Epoch using a formula that approximates the number of seconds between a specified time and the Epoch.
This formula takes account of the facts that all years that are evenly divisible by 4 are leap years, but years that are evenly divisible
by 100 are not leap years unless they are also evenly divisible by 400, in which case they are leap years. This value is not the same as
the actual number of seconds between the time and the Epoch, because of leap seconds and because system clocks are not required to be syn-
chronized to a standard reference. The intention is that the interpretation of seconds since the Epoch values be consistent; see
POSIX.1-2008 Rationale A.4.15 for further rationale.
SEE ALSO date(1), gettimeofday(2), ctime(3), ftime(3), time(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2011-09-09 TIME(2)