Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to chnage format and subtract time and date and get average.? Post 302958508 by mirwasim on Friday 23rd of October 2015 03:46:25 AM
Old 10-23-2015
How to chnage format and subtract time and date and get average.?

Hello All ,

Please support for below request

how to change format and subtract time and date and get average.

xxx 13-OCT-15 11.32.18.241000 AM 13-OCT-15 11.35.49.089080 AM
xxx 13-OCT-15 11.32.24.000000 AM 13-OCT-15 11.45.17.810904 AM
xxx 13-OCT-15 11.32.25.232000 AM 13-OCT-15 11.37.07.204904 AM
xxx 13-OCT-15 11.32.36.537000 AM 13-OCT-15 11.35.04.073646 AMthere can be AM in one column and PM in another.and day can also vary.
Please help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

format date/time presentation

1) i am trying to print the timeframe of a log file using the start/end date/time being extracted from the file itself. my problem is how to convert the following numeric date format to the one that i prefer: Start time: 0204161129 End time : 0204171431 into: Start time: Apr 16 2002... (6 Replies)
Discussion started by: apalex
6 Replies

2. UNIX for Dummies Questions & Answers

Subtract date & time in diferent rows

Hi Friends :) I have a long file having fields in the form : Field1 yy/mm/dd hh:mm:ss Duration(Sec) line 1) 123123 05/11/30 12:12:56 145 line 2) 145235 05/11/30 12:15:15 30 line 3) 145264 05/11/30 13:14:56 178 . . I want to subtract yy/dd/dd hh:mm:ss in line (2) from yy/mm/dd hh:mm:ss in... (1 Reply)
Discussion started by: vanand420
1 Replies

3. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

I have a file named "suspected" with series of line like these : {'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''} {'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies

4. Shell Programming and Scripting

Date and Time format

I want to append current date and time to a file name like filename_090920091210. If I use filename_`date +%d%m%Y%T`, the ouput is filename_0909200912:10:33. How to format this as filename_090920091210. Please let me know. Thanks in advance. (3 Replies)
Discussion started by: srimenon09
3 Replies

5. Shell Programming and Scripting

date and time in mm/dd/yyyy hh:mm format

Frens, I have a logfile which has got manier things in it and somewer in that file i have a date in mm/dd/yyyy hh:mm format.... I just need to get the date and time nothing else.... i have searched in this forum for it but got only date in mm-dd-yyyy format.. but i need to search for... (10 Replies)
Discussion started by: smarty86
10 Replies

6. Shell Programming and Scripting

awk & date time format

This gives: grep "qprt -o -dp -N 1 -P" printfile.log.1216 |awk '{print $7, $9}' |grep lpc1z The output like below: lpc1z /cerner/d_prod/print/ccltemp4235396d030a.dat.tmp.1216075330] lpc1z /cerner/d_prod/print/ccltemp4235396d036a.dat.tmp.1216075634] lpc1z... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

7. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

8. HP-UX

DATE and TIME format help in HP-UX

Hello, I have date format as shown in red color below Fri, Sep 12, 2012 08:38:05 PM Can anyone help me with command to change this format to yyyy-mm-dd and HH:MM:SS Note: Time should be in 24 hours format I really appreciate your help!! Thanks, Elavarasan (4 Replies)
Discussion started by: Elavarasan
4 Replies

9. Shell Programming and Scripting

Subtract two rows (in Time format)

Hello all, I have written sth like this: #!/bin/bash grep -e XXX -e YYYY myfile.log | grep -v ZZZ | awk '{print $1 " " $2 ";" $3 ";" $9 ";" $11}' > myfile.csv sed -i '1iDate;Time;From;To' myfile.csv => it is clear that it converts log to csv and add a header. Now I want to subtract row... (4 Replies)
Discussion started by: frhling
4 Replies

10. Shell Programming and Scripting

Date command - subtract from given time

the given time is: 12:13:00 how do i subtract a 10 minutes from any given time? date '12:13:00' '-10 min' also tried this: date +12:13:00 '-10 min' (2 Replies)
Discussion started by: SkySmart
2 Replies
QLCDNumber(3qt) 														   QLCDNumber(3qt)

NAME
QLCDNumber - Displays a number with LCD-like digits SYNOPSIS
#include <qlcdnumber.h> Inherits QFrame. Public Members QLCDNumber ( QWidget * parent = 0, const char * name = 0 ) QLCDNumber ( uint numDigits, QWidget * parent = 0, const char * name = 0 ) ~QLCDNumber () enum Mode { Hex, Dec, Oct, Bin, HEX = Hex, DEC = Dec, OCT = Oct, BIN = Bin } enum SegmentStyle { Outline, Filled, Flat } bool smallDecimalPoint () const int numDigits () const virtual void setNumDigits ( int nDigits ) bool checkOverflow ( double num ) const bool checkOverflow ( int num ) const Mode mode () const virtual void setMode ( Mode ) SegmentStyle segmentStyle () const virtual void setSegmentStyle ( SegmentStyle ) double value () const int intValue () const Public Slots void display ( const QString & s ) void display ( int num ) void display ( double num ) virtual void setHexMode () virtual void setDecMode () virtual void setOctMode () virtual void setBinMode () virtual void setSmallDecimalPoint ( bool ) Signals void overflow () Properties int intValue - the displayed value rounded to the nearest integer Mode mode - the current display mode (number base) int numDigits - the current number of digits displayed SegmentStyle segmentStyle - the style of the LCDNumber bool smallDecimalPoint - the style of the decimal point double value - the displayed value Protected Members virtual void drawContents ( QPainter * p ) DESCRIPTION
The QLCDNumber widget displays a number with LCD-like digits. It can display a number in just about any size. It can display decimal, hexadecimal, octal or binary numbers. It is easy to connect to data sources using the display() slot, which is overloaded to take any of five argument types. There are also slots to change the base with setMode() and the decimal point with setSmallDecimalPoint(). QLCDNumber emits the overflow() signal when it is asked to display something beyond its range. The range is set by setNumDigits(), but setSmallDecimalPoint() also influences it. If the display is set to hexadecimal, octal or binary, the integer equivalent of the value is displayed. These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters. It is not possible to retrieve the contents of a QLCDNumber object, although you can retrieve the numeric value with value(). If you really need the text, we recommend that you connect the signals that feed the display() slot to another slot as well and store the value there. Incidentally, QLCDNumber is the very oldest part of Qt, tracing back to a BASIC program on the Sinclair Spectrum. [Image Omitted] [Image Omitted] See also QLabel, QFrame, and Basic Widgets. Member Type Documentation QLCDNumber::Mode This type determines how numbers are shown. QLCDNumber::Hex - Hexadecimal QLCDNumber::Dec - Decimal QLCDNumber::Oct - Octal QLCDNumber::Bin - Binary If the display is set to hexadecimal, octal or binary, the integer equivalent of the value is displayed. QLCDNumber::SegmentStyle This type determines the visual appearance of the QLCDNumber widget. QLCDNumber::Outline - gives raised segments filled with the background brush. QLCDNumber::Filled - gives raised segments filled with the foreground brush. QLCDNumber::Flat - gives flat segments filled with the foreground brush. MEMBER FUNCTION DOCUMENTATION
QLCDNumber::QLCDNumber ( QWidget * parent = 0, const char * name = 0 ) Constructs an LCD number, sets the number of digits to 5, the base to decimal, the decimal point mode to 'small' and the frame style to a raised box. The segmentStyle() is set to Outline. The parent and name arguments are passed to the QFrame constructor. See also numDigits and smallDecimalPoint. QLCDNumber::QLCDNumber ( uint numDigits, QWidget * parent = 0, const char * name = 0 ) Constructs an LCD number, sets the number of digits to numDigits, the base to decimal, the decimal point mode to 'small' and the frame style to a raised box. The segmentStyle() is set to Outline. The parent and name arguments are passed to the QFrame constructor. See also numDigits and smallDecimalPoint. QLCDNumber::~QLCDNumber () Destroys the LCD number. bool QLCDNumber::checkOverflow ( double num ) const Returns TRUE if num is too big to be displayed in its entirety; otherwise returns FALSE. See also display(), numDigits, and smallDecimalPoint. bool QLCDNumber::checkOverflow ( int num ) const This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns TRUE if num is too big to be displayed in its entirety; otherwise returns FALSE. See also display(), numDigits, and smallDecimalPoint. void QLCDNumber::display ( const QString & s ) [slot] Displays the number represented by the string s. This version of the function disregards mode() and smallDecimalPoint(). These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters. Examples: void QLCDNumber::display ( int num ) [slot] Sets the displayed value rounded to the nearest integer to num. See the "intValue" property for details. void QLCDNumber::display ( double num ) [slot] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Displays the number num. void QLCDNumber::drawContents ( QPainter * p ) [virtual protected] Draws the LCD number using painter p. This function is called from QFrame::paintEvent(). Reimplemented from QFrame. int QLCDNumber::intValue () const Returns the displayed value rounded to the nearest integer. See the "intValue" property for details. Mode QLCDNumber::mode () const Returns the current display mode (number base). See the "mode" property for details. int QLCDNumber::numDigits () const Returns the current number of digits displayed. See the "numDigits" property for details. void QLCDNumber::overflow () [signal] This signal is emitted whenever the QLCDNumber is asked to display a too-large number or a too-long string. It is never emitted by setNumDigits(). SegmentStyle QLCDNumber::segmentStyle () const Returns the style of the LCDNumber. See the "segmentStyle" property for details. void QLCDNumber::setBinMode () [virtual slot] Calls setMode( BIN ). Provided for convenience (e.g. for connecting buttons to it). See also mode, setHexMode(), setDecMode(), setOctMode(), and mode. void QLCDNumber::setDecMode () [virtual slot] Calls setMode( DEC ). Provided for convenience (e.g. for connecting buttons to it). See also mode, setHexMode(), setOctMode(), setBinMode(), and mode. void QLCDNumber::setHexMode () [virtual slot] Calls setMode( HEX ). Provided for convenience (e.g. for connecting buttons to it). See also mode, setDecMode(), setOctMode(), setBinMode(), and mode. void QLCDNumber::setMode ( Mode ) [virtual] Sets the current display mode (number base). See the "mode" property for details. void QLCDNumber::setNumDigits ( int nDigits ) [virtual] Sets the current number of digits displayed to nDigits. See the "numDigits" property for details. void QLCDNumber::setOctMode () [virtual slot] Calls setMode( OCT ). Provided for convenience (e.g. for connecting buttons to it). See also mode, setHexMode(), setDecMode(), setBinMode(), and mode. void QLCDNumber::setSegmentStyle ( SegmentStyle ) [virtual] Sets the style of the LCDNumber. See the "segmentStyle" property for details. void QLCDNumber::setSmallDecimalPoint ( bool ) [virtual slot] Sets the style of the decimal point. See the "smallDecimalPoint" property for details. bool QLCDNumber::smallDecimalPoint () const Returns the style of the decimal point. See the "smallDecimalPoint" property for details. double QLCDNumber::value () const Returns the displayed value. See the "value" property for details. Property Documentation int intValue This property holds the displayed value rounded to the nearest integer. This property corresponds to the nearest integer to the current value displayed by the LCDNumber. This is the value used for hexadecimal, octal and binary modes. If the displayed value is not a number, the property has a value of 0. Set this property's value with display() and get this property's value with intValue(). Mode mode This property holds the current display mode (number base). Corresponds to the current display mode, which is one of BIN, OCT, DEC (the default) and HEX. DEC mode can display floating point values, the other modes display the integer equivalent. See also smallDecimalPoint, setHexMode(), setDecMode(), setOctMode(), and setBinMode(). Set this property's value with setMode() and get this property's value with mode(). int numDigits This property holds the current number of digits displayed. Corresponds to the current number of digits. If QLCDNumber::smallDecimalPoint is FALSE, the decimal point occupies one digit position. See also smallDecimalPoint. Set this property's value with setNumDigits() and get this property's value with numDigits(). SegmentStyle segmentStyle This property holds the style of the LCDNumber. <center>.nf </center> Outline and Filled will additionally use QColorGroup::light() and QColorGroup::dark() for shadow effects. Set this property's value with setSegmentStyle() and get this property's value with segmentStyle(). bool smallDecimalPoint This property holds the style of the decimal point. If TRUE the decimal point is drawn between two digit positions. Otherwise it occupies a digit position of its own, i.e. is drawn in a digit position. The default is FALSE. The inter-digit space is made slightly wider when the decimal point is drawn between the digits. See also mode. Set this property's value with setSmallDecimalPoint() and get this property's value with smallDecimalPoint(). double value This property holds the displayed value. This property corresponds to the current value displayed by the LCDNumber. If the displayed value is not a number, the property has a value of 0. Set this property's value with display() and get this property's value with value(). SEE ALSO
http://doc.trolltech.com/qlcdnumber.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qlcdnumber.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QLCDNumber(3qt)
All times are GMT -4. The time now is 05:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy