I have a shell script which gets passed a parameter which is a combination of Year and Julian Date <YYYYj>. So April 11th, julian date is 101. So if I wanted April 11th for 2003 I would get the following value 2003101. How would I convert that in unix to be 20030411? I am using the korn shell. (3 Replies)
Hi,
is there any possibility to find julian date for given corresping date.
I will be gladfull if i get it.
Requirement :
Input : 10 09 2006
output: julian date: 283
thanks
srikanth (2 Replies)
Hi, i;m beginner of Unix, i trying to use crontab to zip my log file automatically, below is my coding, some of the statement i don't know whether is correct or not. Pls help:)
year=`date '+%Y'`
month=`date '+%m'`
day=`date '+%d'`
day=`expr $day - 1`
case $month in
1 | 3 | 5 | 7 | 8 | 9 |... (4 Replies)
Hi,
im new for UNIX. i have a problem in date function. please help me to find a solution.
batchdate="29/10/2010"
nextdate="01/11/2010"
i want compare this two date. if my batch date greater than nextdate should prompt error message. how can i do that? as i know its better and safer if i... (2 Replies)
Hi all,
I require to convert julian date to normal calander date in unix
for eg julian date=122
now i want corresponding calander date
----------------------------------------
gr8 if give very small command/script
and please explain the steps as well(imp)
Thanks
... (3 Replies)
The 6th & 7th column of the text files represents date & time. I need this to be converted in julian format using command "date +%s -d <date>". I know the command, but dont know how to use it on the script
0 dbclstr-b IXT_Web Memphis_Prod_SQL_Full Memphis-Prod-SQL-Full-Application-Backup... (4 Replies)
Hi
I am trying to schedule a job through Autosys through UNIX on a particular day of every month (for example 20th of every month). Can some one please help me whats the command or whats the process to run on that particular day of month.
Thank you, (2 Replies)
How to get Julian date (Three digit) of a given date (Not current date)? I do not have root privilege - so can not use date -d. Assume that we have three variables year, month and date.
Thx (5 Replies)
Discussion started by: Soham
5 Replies
LEARN ABOUT PLAN9
ctime
CTIME(2) System Calls Manual CTIME(2)NAME
ctime, localtime, gmtime, asctime, timezone - convert date and time to ASCII
SYNOPSIS
#include <u.h>
#include <libc.h>
char* ctime(long clock)
Tm* localtime(long clock)
Tm* gmtime(long clock)
char* asctime(Tm *tm)
/env/timezone
DESCRIPTION
Ctime converts a time clock such as returned by time(2) into ASCII (sic) and returns a pointer to a 30-byte string in the following form.
All the fields have constant width.
Wed Aug 5 01:07:47 EST 1973
Localtime and gmtime return pointers to structures containing the broken-down time. Localtime corrects for the time zone and possible day-
light savings time; gmtime converts directly to GMT. Asctime converts a broken-down time to ASCII and returns a pointer to a 30-byte
string.
typedef
struct {
int sec; /* seconds (range 0..59) */
int min; /* minutes (0..59) */
int hour; /* hours (0..23) */
int mday; /* day of the month (1..31) */
int mon; /* month of the year (0..11) */
int year; /* year A.D. - 1900 */
int wday; /* day of week (0..6, Sunday = 0) */
int yday; /* day of year (0..365) */
char zone[4]; /* time zone name */
} Tm;
When local time is first requested, the program consults the timezone environment variable to determine the time zone and converts accord-
ingly. (This variable is set at system boot time by init(8).) The timezone variable contains the normal time zone name and its difference
from GMT in seconds followed by an alternate (daylight) time zone name and its difference followed by a newline. The remainder is a list
of pairs of times (seconds past the start of 1970, in the first time zone) when the alternate time zone applies. For example:
EST -18000 EDT -14400
9943200 25664400 41392800 57718800 ...
Greenwich Mean Time is represented by
GMT 0
SOURCE
/sys/src/libc/9sys
SEE ALSO date(1), time(2), init(8)BUGS
The return values point to static data whose content is overwritten by each call.
Daylight Savings Time is ``normal'' in the Southern hemisphere.
These routines are not equipped to handle non-ASCII text, and are provincial anyway.
CTIME(2)