Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I want to seperate my data by time of day Post 302280392 by joeyg on Monday 26th of January 2009 09:29:34 PM
Old 01-26-2009
Question

That should be 24 hour time.
About separating day/night... how do you define day/night?
is day >=06:00 and <18:00 ?
or do you split at 12:00 ? as in am/pm?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to seperate data

Hello ALL, I really need help to grep data and store in particular format. I am struggling to write that script .Please help me to solve this problem otherwise i will loose my job... I have to compare 2 files and generate the staticts of the data. First file product.dat contains 2 column . ... (4 Replies)
Discussion started by: getdpg
4 Replies

2. Shell Programming and Scripting

how to awk a data from seperate lines

Hi guys, i have a problem which im hoping you will be able to help me with. I have follwing output :- ------------------------------------------------------------------------------- NSTEP = 407000 TIME(PS) = 43059.000 TEMP(K) = 288.46 PRESS = 0.0 Etot = -2077.4322 ... (2 Replies)
Discussion started by: Mish_99
2 Replies

3. Shell Programming and Scripting

UNIX -> send data as excel in seperate cells

Hi I have a data file in UNIX as follows. I need to send this file in Mail as excel format. but the problem i face is i get the data all in single cells per row. what can i do to get the data in seperate cells. File -> attachment.xls data data data data data1 data1 ... (1 Reply)
Discussion started by: vj8436
1 Replies

4. Shell Programming and Scripting

awk convert seconds to time of day

Does anyone know of a way to convert "seconds" to time of day in "hh:mm:ss" ? Trying to do in awk with strftime but with no luck. Thanks (2 Replies)
Discussion started by: timj123
2 Replies

5. Shell Programming and Scripting

value of variable based on time of the day

i would need some help in setting the value of a variable (TIME_NOW) depending on the time of the day ...e.g. if today's date is 12th April 2009 and if the current time is between midnight and 16:59:59 hrs then the TIME_NOW should be yesterday's date i.e. TIME_NOW=11 else if the current time... (3 Replies)
Discussion started by: zainravi
3 Replies

6. Shell Programming and Scripting

How to? Every day, same time... script...

I manage to find and proces one script, now i need to automate this script for every day at the same time... (2 Replies)
Discussion started by: voltaza
2 Replies

7. AIX

Time of Day Question

I have a question i need clarification. We had a problem on a p520 system and had to pull the battery on the service processor card. That did the trick and system booted. We forgot to set the time in the service processor before booting. Once AIX was booted we changed the date and time there. ... (1 Reply)
Discussion started by: ryan0911
1 Replies

8. UNIX for Advanced & Expert Users

Need to get the time difference for all the transactions in a day

Hello Experts, I need to evaluate my API performance, so need a script to get the time difference for all the transaction that has gone through my application in a day. The challenge is the multi threaded logs, so I cant just get all the Telephone Numbers and check the entering and existing... (5 Replies)
Discussion started by: samjna
5 Replies

9. Shell Programming and Scripting

Get day of week from epoch time

Need assistance . Below code gives me the date but I wanted output as day of the week (wday) . Code: use Time::Local; my $time=timelocal(1,2,3,9,11,2013); $theTime = localtime($time); print "$theTime\n"; Result: Mon Dec 9 03:02:01 2013 Wanted output as only Mon (2 Replies)
Discussion started by: ajayram_arya
2 Replies
GETDATE(3)						     Library Functions Manual							GETDATE(3)

NAME
getdate - convert time and date from ASCII SYNOPSIS
#include <sys/types.h> #include <sys/timeb.h> time_t getdate(buf, now) char *buf; struct timeb *now; DESCRIPTION
Getdate is a routine that converts most common time specifications to standard UNIX format. The first argument is the character string containing the time and date; the second is the assumed current time (used for relative specifications); if NULL is passed, ftime(2) is used to obtain the current time and timezone. The character string consists of 0 or more specifications of the following form: tod A tod is a time of day, which is of the form hh:mm[:ss] (or hhmm) [meridian] [zone]. If no meridian - am or pm - is specified, a 24-hour clock is used. A tod may be specified as just hh followed by a meridian. date A date is a specific month and day, and possibly a year. Acceptable formats are mm/dd[/yy] and monthname dd[, yy] If omitted, the year defaults to the current year; if a year is specified as a number less than 100, 1900 is added. If a number not followed by a day or relative time unit occurs, it will be interpreted as a year if a tod, monthname, and dd have already been specified; other- wise, it will be treated as a tod. This rule allows the output from date(1) or ctime(3) to be passed as input to getdate. day A day of the week may be specified; the current day will be used if appropriate. A day may be preceeded by a number, indicating which instance of that day is desired; the default is 1. Negative numbers indicate times past. Some symbolic numbers are accepted: last, next, and the ordinals first through twelfth (second is ambiguous, and is not accepted as an ordinal number). The symbolic number next is equivalent to 2; thus, next monday refers not to the immediately coming Monday, but to the one a week later. relative time Specifications relative to the current time are also accepted. The format is [number] unit; acceptable units are year, month, fort- night, week, day, hour, minute, and second. The actual date is formed as follows: first, any absolute date and/or time is processed and converted. Using that time as the base, day- of-week specifications are added; last, relative specifications are used. If a date or day is specified, and no absolute or relative time is given, midnight is used. Finally, a correction is applied so that the correct hour of the day is produced after allowing for daylight savings time differences. Getdate accepts most common abbreviations for days, months, etc.; in particular, it will recognize them with upper or lower case first let- ter, and will recognize three-letter abbreviations for any of them, with or without a trailing period. Units, such as weeks, may be speci- fied in the singular or plural. Timezone and meridian values may be in upper or lower case, and with or without periods. FILES
/usr/lib/libu.a SEE ALSO
ctime(3), time(2) AUTHOR
Steven M. Bellovin (unc!smb) Dept. of Computer Science University of North Carolina at Chapel Hill BUGS
Because yacc(1) is used to parse the date, getdate cannot be used a subroutine to any program that also needs yacc. The grammar and scanner are rather primitive; certain desirable and unambiguous constructions are not accepted. Worse yet, the meaning of some legal phrases is not what is expected; next week is identical to 2 weeks. The daylight savings time correction is not perfect, and can get confused if handed times between midnight and 2:00 am on the days that the reckoning changes. Because localtime(2) accepts an old-style time format without zone information, attempting to pass getdate a current time containing a dif- ferent zone will probably fail. unc GETDATE(3)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy