How to calculate the time
I want to calculate the time. I want to subtract ' 01:00:00 ' AM currently, but I am getting error.SQL > /.
Select to_char('01:00:00','HH24:MI:SS')-to_char(sysdate,'HH24:MI:SS') double
*
ERROR on line 1:
ORA-01722: invalid number
can someone help me
Thank you
Not sure what you mean. If you want to subtract an hour from a date, keep in date arithmetic spirit uses day as a unit. To subtract an hour from a date, you need to subtract 1/24:
SQL> alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS'
2 /
Session altered.
SQL> select sysdate,sysdate - 1/24 from dual
2 /
SYSDATE SYSDATE-1/24
------------------- -------------------
08/09/2009 09:55:28 08/09/2009 08:55:28
SQL>
SY.
Tags: Database
Similar Questions
-
How to calculate the time to SELECT
I want to know how to calculate the time taken by the SELECT query.
For example: I run a select statement in TOAD (oracle version 9i) who takes 40 seconds to run, but in the output window, it displays few records. It says "list 1 of 500 records, more records exist". This table has total 20 million records.
Now my question is: have you my SELECT query took 40 seconds? or it took 40 seconds to SELECT 500 records.
If it took 40 seconds to SELECT 500 records then how to calculate the total amount?
Any help would be much appreciated.To avoid the exit which is probably not really need you can make
begin for c in (select * from xy /*your query */) loop null; end loop; end; /
This gives an estimate of the time to recover all the lines.
-
How to calculate the time difference
Hi friends,
I want to calculate and the sum of the time difference.
I have two fields in a table. Inside and OUTSIDE. for example.
OUT IN DIFFERENT
01:46 15:30?
01:47 15:45?
02:50 17:30?
I want less above figure and the result will appear in different column.
Help, please
Kind regards
Hello
Assuming that the two columns are the VARCHAR2 data type and "represent" the hours and minutes:
WITH sample_data AS (SELECT ' 01:46 ' in_col, 15:30 ' out_col FROM DUAL)
UNION ALL
SELECT ' 01:47 ' 15:45 ' OF THE DOUBLE
UNION ALL
SELECT ' 02:50 ', 17:30 ' OF THE DOUBLE
)
SELECT in_col,
out_col,
TO_CHAR (TO_DATE ((TO_DATE(out_col, 'HH24:MI')-TO_DATE(in_col, 'HH24:MI')) * 86400, «SSSSS»), "HH24") differ))
OF sample_data;
SQL > WITH sample_data AS (SELECT ' 01:46 ' in_col, 15:30 ' out_col FROM DUAL)
2. ANY TRADE UNION
3. SELECT ' 01:47 ' 15:45 ' OF THE DOUBLE
4 UNION ALL
5. SELECT ' 02:50 ', 17:30 ' OF THE DOUBLE
6 )
7. SELECT in_col,
out_col 8,.
9 to_char (TO_DATE ((TO_DATE(out_col, 'HH24:MI')-TO_DATE(in_col, 'HH24:MI')) * 86400, «SSSSS»), "HH24") differ))
10 FROM sample_data;
IN_COL OUT_COL DIFFER
------ ------- ------
01:46 15:30 13:44
01:47 15:45 13:58
02:50 17:30 14:40
SQL >
-
How to calculate the time difference in the two date columns time.
Hi Obiee Experts,
I came back new requirement on obiee 10g.
I have two date columns in my table time, data as below.
StartDate: 18/03/2012-04:40:51
Closing date: 18/03/2012-04:50:55
I want to the output as below (Jet lag).
output
04:40:51 (less)-04:50:55 = 00:10:04
I hope you understand my requirement in OBIEE.
Note: I want to show above the output values in another State for OBIEE10g column.
Please share me your valuable contributions. Urgent appeals.
Thank you
SatyaHi Satya,
Here's another solution. You can try the formula below as it is:
Cast (floor (TIMESTAMPDIFF (sql_tsi_second, '-SNP_SESSION '.))) SESS_BEG, '-SNP_SESSION '. SESS_END) / 3600) as char). ':' ||
Cast (floor (mod (TIMESTAMPDIFF (sql_tsi_second, '-SNP_SESSION '.)))) SESS_BEG, '-SNP_SESSION '. ((SESS_END), 3600) / 60) as char). ':' ||
Cast (mod (TIMESTAMPDIFF (sql_tsi_second, '-SNP_SESSION '.))) SESS_BEG, '-SNP_SESSION '. SESS_END), 60) as char)I would like to know if that's what you're looking for.
Thank you
-
How to calculate the time interval
Dear Gururs,
I have table of details of the calls as below
Call_Detail DESC;
Name of Type Null
--------- ---------- --------------
Appeal of VARCHAR2 (20)
VARCHAR2 (20) called
Time DATE
in other words table contains each call on a day like this
The call | Called | Time
========================================
A | B | January 1, 2011 00:02:00
A | B | January 1, 2011 00:08:00
A | B | January 1, 2011 00:18:00
A | B | January 1, 2011 00:22:00
A | B | January 1, 2011 00:30:00
A | B | January 1, 2011 00:31:00
I want output like below
The call | Called | Time | Time Difference (sec)
==============================================================
A | B | January 1, 2011 00:02:00 | 360
A | B | January 1, 2011 00:08:00 | 600
A | B | January 1, 2011 00:18:00 | 240
A | B | January 1, 2011 00:22:00 | 480
A | B | January 1, 2011 00:30:00 | 60
A | B | January 1, 2011 00:31:00 | 0
Could someone help to above.
Concerning
SanjeevHello
Use the analytical fucntion of LEAD to get a value on the next line.
For example:SELECT calling , called , NVL ( ( LEAD (time) OVER ( PARTITION BY calling , called ORDER BY time ) - time ) * 24 * 60 * 60 , 0 ) AS time_difference_sec FROM call_detail ORDER BY calling , called , time ;
If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.
Published by: Frank Kulash, January 11, 2011 10:18
-
calculate the time difference.
Hello
How to calculate the time difference by using javascript.
Example 15.05 and18.35 difference is 2 h 30 min
BTW: it isn't ~ 2h30min is 3h30min
Maybe something like this works:
// result is 3.300000000000002 ~ 3h 30min (parseFloat((18.35 - 15.05) / 3600) * 3600)
-
How to calculate the execution time of a SCTL in FPGA VI?
Hello
Can someone guide me that how to calculate the execution time of a SCTL for an iteration in the FPGA VI?
Thank you and best regards,
Rashid
Hello r,.
A SCTL will always run in a beat the clock it has been linked to. So, if you use a 40 MHz clock, this loop will run in 25 ns. If the code cannot complete in that, or if it requires two graduations of the watch to do the calculation, your code does not compile, then you have the guarantee that this will always be how long it takes this piece of code to run.
-
How to calculate the execution time of a loop?
Hello
Can someone guide me that how to calculate the execution time of a loop to iterate?
Thank you and best regards,
Rashid
I hope I have your question! See attached screenshot
-
How to calculate the loading time of BDB startup
Hi all
I understand that Berkeley DB at startup it will read a few pages from the disk in the memory cache, but I don't know the exact number of pages that will load. I think that BDB will load default pages as much as possible in the cache until the cache is full. Is this good?
And how to calculate the cost of time on the loading process? Can it be verified using db_stat?
Thank you very muchHello.
There is a discussion on how proceed (preload the cache) in this thread:
Re: a question about read file or cacheBen Schmeckpeper
-
How to calculate the difference in response times
Hello
I need to calculate the time difference of BI answers and I don't have access to the repository. I have the data in the following format
2005-10-12 19:24:19 12/10/2005 19:32:04
2005-10-12 19:50:47 2005-10-12 20:52:36
2005-10-12 19:54:23 04/11/2005 22:47:32
2005-10-12 21:05:51 12/10/2005 21:08:58
2005-10-12 21:07:42 12/10/2005 21:14:47
2005-10-12 21:09:02 12/10/2005 21:10:57
I need to get the hours of elapased between these two columns. Please help me
Thank youTimeStampDiff (SQL_TSI_HOUR, table.column1, table.column2)
-
To build the waveform.vi function how to calculate the value of dt
Dear all
Please guide me How to calculate the value of dt according to waveform.vi of construction
My sampling rate is 25000 and I take 200000 samples.
Kind regards
Muhammad Irfan
It's all simple arithmetic. The inverse of the sampling frequency power of samples is then the dt or the time between samples the number of samples is not relevant.
-
How to calculate the length of the video format (seconds)
Hello
I use the ActionScript 3.0 CookBook book and it shows how to calculate the length of a video (and also playing the video in progress) in seconds using the property at the time of the NetStream class.
So, for example, the length of my video is 1070 seconds.
But I want to be able to convert a format such as ' 00 (hours): 00 (mins): 00 (dry) ", '1070 seconds' how can I get this?
Any help is appreciated!
TA :)
Kind regards
M.Hi, thanks for the reply :) you have helped me understand the following code which I just found (and that seemed to work the way I needed it).
Quote:
If (_duration > 0 & _stream.time > 0)
{
_playbackTime.text = generateTime (_stream.time);
}function generateTime(nCurrentTime:Number):String
{
var nMinutes:String = (Math.floor(nCurrentTime / 60)< 10="" "0"="" :="" "")="" +="" math.floor(ncurrenttime="">
var nSeconds:String = (Math.floor (nCurrentTime % 60)< 10="" "0"="" :="" "")="" +="" math.floor(ncurrenttime="" %="">Result set
var sResult:String = nMinutes + ":" + nSecondes;Return value
return sResultat;
} -
How to calculate the second and minisecond for audio landmark
I'm doing a sound synchronization for the clip audio and video in Flash. I found a tutorial on the web, and it seems to work. However, I do not know how to calculate the second and the mini (deuxieme from mp3 file. The first frame has the following lines to set the duration for each animation:
Import class
Import net.quip.sound.SoundSync;
Stop the main timeline
Stop();
Create an instance of SoundSync
var ss:SoundSync = new SoundSync();
ss.addCuePoint ("IT", 20100);
ss.addCuePoint ("admin", 20000);
ss.addCuePoint ("maintenance", 19800);
ss.addCuePoint ("treatment", 16479);
ss.addCuePoint ("engineering", 14598);
as.addCuePoint ("logo_epa_npdes", 12356);
ss.addCuePoint ("construction", 8967);
ss.addCuePoint ("370 mg/j", 7896);
ss.addCuePoint ("mc_650, 000 ', 5439);
ss.addCuePoint ("130 mg/j", 3254);
ss.addCuePoint ("1938", 2439);
ss.addCuePoint ("vintage_mc", 0);
Use the instance of loading external MP3
ss.loadSound ("Scn04 - 05.mp3", true);
Create a listener object for the
cuePoint and onSoundComplete events
var listener: Object = new Object();
listener.cuePoint = function (): Void {}
Play();
}
listener.onSoundComplete = function (): Void {}
Play();
}
ss.addEventListener ("cuePoint", listener);
ss.addEventListener ("onSoundComplete", listener);
and the soundsync.as file as follows:
Import mx.events.EventDispatcher;
Import mx.utils.Delegate;
class net.quip.sound.SoundSync extends its {}
PROPERTIES
private var _cuePoints:Array;
private var _currentCuePoint:Number;
private var _interval:Number;
private var _intervalDuration:Number;
private var _secondOffset:Number;
Event dispatcher
public var dispatchEvent:Function;
public var addEventListener:Function;
private var removeEventListener:Function;
CONSTRUCTOR
public void SoundSync(target:MovieClip) {}
Super (target);
init();
}
METHODS
private function init (): Void {}
Initialize properties
_cuePoints = new Array();
_currentCuePoint = 0;
_intervalDuration = 200;
_secondOffset = 0;
Initialize the instance of the class as the valid event broadcaster
EventDispatcher.initialize (this);
}
Add Cue Point
public void addCuePoint(cuePointName:String,_cuePointTime:Number):Void {}
() _cuePoints.push
{
type: "cuePoint",.
name: cuePointName,.
time: cuePointTime,.
target: this
}
);
_cuePoints.sortOn ("time", Array.NUMERIC);
}
Get cue point
public void getCuePoint(nameOrTime:Object):Object {}
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (typeof (nameOrTime) == 'string') {}
If (_cuePoints [meter] .name == nameOrTime) {}
return _cuePoints [counter];
}
} Else if (typeof (nameOrTime) == 'number') {}
If (_cuePoints [meter] .time == nameOrTime) {}
return _cuePoints [counter];
}
}
counter ++;
}
Returns a null value.
}
Get the Index of the current Cue Point
private void getCurrentCuePointIndex(cuePoint:Object):Number {}
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (_cuePoints [meter] .name == cuePoint.name) {}
return the meter;
}
counter ++;
}
Returns a null value.
}
Get the next Cue Point index
private void getNextCuePointIndex(seconds:Number):Number {}
seconds (seconds) =? seconds: 0;
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (_cuePoints [meter] .time > = seconds * 1000) {}
return the meter;
}
counter ++;
}
Returns a null value.
}
Benchmark deleted
public void removeCuePoint(cuePoint:Object):Void {}
_cuePoints.splice (getCurrentCuePointIndex (cuePoint), 1);
}
Remove all Cue Points
public function removeAll_cuePoints (): Void {}
_cuePoints = new Array();
}
Beginning
public void start(secondOffset:Number,_loops:Number):Void {}
Super.Start (secondOffset, loops);
dispatchEvent ({type: "onStart", target: this});
Reset benchmark
_secondOffset = secondOffset;
_currentCuePoint = getNextCuePointIndex (secondOffset);
Poll for cue points
clearInterval (_interval);
_interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
}
Load sound
public void loadSound(url:String,_isStreaming:Boolean):Void {}
super.loadSound (url, isStreaming);
clearInterval (_interval);
_interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
}
Stop
public void stop(linkageID:String):Void {}
If {(linkageID)
Super.Stop (linkageID);
} else {}
Super.Stop ();
}
dispatchEvent ({type: "onStop", target: this});
Kill the ballot
clearInterval (_interval);
}
Survey benchmarks
private function pollCuePoints (): Void {}
If the current position is close to the cue point.
var time: Number = _cuePoints [_currentCuePoint] .time;
var span: Number = (_cuePoints [_currentCuePoint + 1] .time)? _cuePoints [_currentCuePoint + 1] .time: time + _intervalDuration * 2;
If (position > = time & & position < = span) {}
Send event
dispatchEvent (_cuePoints [_currentCuePoint]);
Advance to the next landmark...
If (_currentCuePoint < _cuePoints.length) {}
_currentCuePoint ++;
} else {}
_currentCuePoint = getNextCuePointIndex (_secondOffset);
}
}
}
EVENT HANDLERS
onSoundComplete
public function onSoundComplete (): Void {}
Kill the ballot
clearInterval (_interval);
Reset benchmark
_currentCuePoint = 0;
Send event
dispatchEvent ({type: "onSoundComplete", target: this});
}
}
any help will be greatly appreciated.Wuzhishan,
> Hi Dave, your tutorial is very cute and it is very useful.
Thank you! My daughter is cute. She inherited all of
me, so I have not left. ;)> I'm sorry that I don't have my question clearly.
No worries. :)
> I have listen mp3 in Windows Media Player and try to
> get both for the tail, I found it on the bottom of the
> player time indicates 00:26.I'm with you.
> How can I writer this number in the code? Is it 0026 or 26?
The code expects milliseconds, then 26 seconds would be written as
this:26000
If he said 01:22 (one minute and 22 seconds), you must write it like this:
82000
... which is 60 seconds for now, 22 seconds
side, then multiplied by 1,000 to get milliseconds.David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design." -
How to calculate the ckptLogVolume?
Hello:
I have a question about control, our policy of ckeckpoint is 10 minutes or volume of data has come up to 1 G, but from the ckpthistory, we can see sometimes it does not respond to volume 10 minitues or 1 G. How to calculate the ckptLogVolume? If we see the result ckpthistory? If possible, which column? Thank you...
call ttCkptConfig;
< 600, 1024, 0 >
call ttckpthistory;
< 15:26:50.539519 2009-05-15, 2009-05-15 15:26:55.524454, fuzzy, completed, Checkpointer, < NULL >, 1, 99, 247909568, 82508, 4294967296, 81197, 1750236928, 15457, 301826504, 327339272, < NULL > >
< 15:17:20.577626 2009-05-15, 2009-05-15 15:17:20.857039, static, final, Subdaemon, < NULL >, 0, 97, 242211472, 81004, 4294967296, 79563, 1686897608, 20, 1573232, 1618112, < NULL > >
< 15:16:49.203124 2009-05-15, 2009-05-15 15:16:55.300502, static, final, Subdaemon, < NULL >, 1, 97, 242211320, 81004, 4294967296, 79563, 1686897608, 13070, 280099880, 239440672, < NULL > >
< 15:16:21.659487 2009-05-15, 2009-05-15 15:16:28.507656, static, final, Subdaemon, < NULL >, 0, 97, 242211168, 81004, 4294967296, 79563, 1686897608, 14441, 307440952, 265360008, < NULL > >
< 15:11:38.139007 2009-05-15, 2009-05-15 15:11:43.322764, fuzzy, completed, Checkpointer, < NULL >, 1, 96, 80730544, 81450, 4294967296, 80193, 1726321176, 14842, 308879240, 321674504, < NULL > >
< 15:08:18.118181 2009-05-15, 2009-05-15 15:08:23.100922, fuzzy, completed, Checkpointer, < NULL >, 0, 94, 79302232, 81558, 4294967296, 80382, 1737702968, 15017, 311253288, 334736648, < NULL > >
< 15:05:00.002139 2009-05-15, 2009-05-15 15:05:05.081461, fuzzy, completed, Checkpointer, < NULL >, 1, 92, 76043440, 81559, 4294967296, 80386, 1737962016, 15053, 311957568, 335301896, < NULL > >
< 15:01:41.882166 2009-05-15, 2009-05-15 15:01:46.959502, fuzzy, completed, Checkpointer, < NULL >, 0, 90, 74032552, 81594, 4294967296, 80425, 1740156304, 15008, 311831160, 337583368, < NULL > >Checkpopint operations which are drivern by the volume of interval and log checkpoint are those that are 'Checkpointer' in the output of ttCkptHistory. Control points can also occur for other reasons, for example when the data store is stopped, when it is loaded in memory and recovery is necessary. These kinds of control point are marked as "Static" and "Subdaemon". You can see three of those in the output.
The output, it seems you're checkpointing about every 4 minutes. Assuming the target settings (interval 600 seconds, Journal volume of 1 GB) were already in place at the time of these control points has occurred then it seems that all of these were led by the volume of the journal rather than the checkpoint interval (that you generate ~ 1 GB of log about every 4 minutes).
Chris
-
How to set the time that my screen stays on?
How to set the time that my screen lights up. I have an iPod Touch 6?
Settings > general > auto-lock
Maybe you are looking for
-
Need Sound card driver for Satellite L40 - 18 X Win XP
Dear Team Support/User I formatted my laptop 2 days back. I have download all drivers except sound card as the driver download site show the driver me in the list but when I click it it do not open the page. Details on my laptop is less thanmodel: Sa
-
Want to help the 23 d010ea graphics card
Recently, I got a d010ea 23 want to and want to put a dedicated graphics card. I know there's an MXM slot and I opened to check for this. I was wondering if anyone can shed some light on what we should I put in? IV looked and found some AMD and Nvidi
-
Microsoft Money 2005 - password problem
password protected on Money 2005 weren't my files, but when I try to restore a backup file the software ask you a password. I can't load the files - any suggestions how I solve this problem
-
Lost emails after you are prompted to compact the account to save space
original title: Aargh! Lost emails! I hope this is the right forum - cannot find a specific to Outlook Express, my mail server.I was asked recently to compact my emails, to save space and did.Apparently, I did not notice a check mark which allowed th
-
How to activate the screen of welcome and fast user switch client services for netware
How to activate the screen of welcome and fast user switch client Services for NetWare... How to restore and step to uninstall client services for netware