Calculation of time PHP
I have a SQL table with a 'projdue' column, I want a list of projects and then have a 'status' to show which ones is:
1. within the limits (1 week +) deadline
2. in the week following the deadline
3 due today
4. late
It of what I have so far, but the 'within one week of the date limit' is not displayed
<?php $dateparts = preg_split('/[-\s]/', $row_rsProjects['projdue']);
$projdue = mktime(0,0,0, $dateparts[1], $dateparts[2], $dateparts[0]);
$today = mktime(0,0,0, date('n'), date('j'), date('Y'));
if ($projdue > $today) { ?>
Within Deadline <?php }
else if ($projdue - $today >= (7 * 24 * 60 * 60)) { ?>
Within 1 week of Deadline <?php }
else if ($projdue == $today) { ?>
Due Today <?php }
else if ($projdue < $today) { ?>
Overdue <?php } ?>
Your logic is false. The first condition checks if $projdue is greater than $today. Which will correspond to true, even if $projdue is greater than $today a second. As a result, the second condition is never considered. The first condition must check for projects due less than a week:
if ($projdue > $today && ($projdue - $today <= 7*24*60*60)) { ?>
Within 1 week of Deadline $today) { ?>
Within Deadline
Due Today
Overdue
Tags: Dreamweaver
Similar Questions
-
Could use a little help. I work on the calculation of a starting time for a hike. I have the time I want to end up like 17:00, the next cell contains the number of miles. I want to take the time of the end, subtract the number of miles / 2 and ending up with a start time.
Here is an example:
Cell A1: 17:00
Cell A2: 13
Cells A3: some math to convert time functions (A1 - (A2 / 2)) = 10:30
Make sense?
You can subtract a duration of a period
Enter the time in the cell B1
Enter the distance you plane to travel to B2
Enter the rate you plan to walk in cell B3
calculate the length of walk in cell B4 by using the formula:
= DURATION (0,0,B2÷B3)
now calculate the start time in cell B5 by using the formula:
B1−B4
-
calculation of time between two time as timestamp
How can calculate two hour, START as the timestamp TIME in the data type, END TIME as of time also.
select END_TIME-START_TIME from PROG_DLY_WORK
Result
+ 01:50:00.000000 000000000
How can get exactly the time spent as 01:50 ? and these calculated time must sum (elapsed_time) in another column.
oracle as PaaS cloud environment
Product VERSION STATUS NLSRTL 11.2.0.3.0 Production Oracle Database 11g Enterprise Edition 11.2.0.3.0 64 bit Production PL/SQL 11.2.0.3.0 Production AMT for Linux: 11.2.0.3.0 Production Time difference between two columns in hours
Start
FOR REC IN (SELECT START_TIME, END_TIME, CALC_TIME CAL_ID)
LOOP
UPDATE CALc_TIME
SET ELAPSED_TIME = round (())
TO_DATE (to_char (REC. End_time, 'ddmmyyyyhh24miss'),
"ddmmyyyyhh24miss")-
TO_DATE (to_char (REC. Start_time, 'ddmmyyyyhh24miss'),
"ddmmyyyyhh24miss")
() * 24).
WHERE CAL_ID = REC. CAL_ID;
END LOOP;
end;
Lag in minutes
Start
FOR REC IN (SELECT START_TIME, END_TIME, CALC_TIME CAL_ID)
LOOP
UPDATE CALc_TIME
SET ELAPSED_TIME = round (())
TO_DATE (to_char (REC. End_time, 'ddmmyyyyhh24miss'),
"ddmmyyyyhh24miss")-
TO_DATE (to_char (REC. Start_time, 'ddmmyyyyhh24miss'),
"ddmmyyyyhh24miss")
() * 24 * 60)
WHERE CAL_ID = REC. CAL_ID;
END LOOP;
end;
-
Hello
I'm really a novice in the field of pdf script, I would like to ask if someone could help me make a calculation script of a time field with a TOTAL production WORKED HOURS in a day to a calculation of
(TimeIN + TimeOUT) - (TimeBreakIN + TimeBreakOUT)
still other topics that the TimeIN, timeout, the TimeBreakIN or the TimeBreakOUT can also run through midnight
I'm looking for other forums, but not found anything that could match my needs.
Time at: 17:00
TimeBreakIN: 20:00
TimeBreakOUT: 21:00
OUT time: 02:30
the script that I expected to be in the
TOTAL HOURS WORKED is: 8.50 (or 08:30)
I will be also repopulate this script to each row/day until I add in 1 pay as a TOTAL period
Thanks in advance to those who can help me.
Hi JunPapay,
You may want to take a look at this: calculations between two time fields
Thank you
Abhishek
-
Duplicate calculations several times on a PDF?
Hello
When you use Acrobat Pro XI is there a way to repeat a calculation on a PDF page without having to manually
create a product of 2 cells each time?
See picture attached as an illustration of the issue.
Thank you
Chris.
This type of table is quite common and Acrobat takes care of everything. What is possible is to place a call to a function that performs the calculation in the case of calculating of the calculated field. You can create the function so that it takes into account the line number, so she can determine which entry of the field values to retrieve. You can then copy the calculated field and rename it or use a script to set the calculation script after you have created all the fields. It's easier to say that to do, is not as simple it is in Excel, but if you do that a lot it is a value in technical developing like this to increase the efficiency of form design.
-
Calculation of time with FormCalc
Hello!
I am trying to create a simple time sheet form in the designer, but things don't seem to work in the way that I expected.
I have two time fields where users are supposed to inform the hours start and end time for a job. A third hour field must display the elapsed time.
So, I tried to solve this problem with FormCalc:
var interval = 0
interval = Time2Num (endTime.formattedValue, "HH: mm")-Time2Num (startTime.formattedValue, "HH: mm")
$.formattedValue = Num2Time (interval, "HH: mm")
It does not work. I mean, if I inform startTime = 10:00 and endTime = 11:00, the result is 23:00. How is it?
Now, if I inform startTime = 09:00 and endTime = 11:00, the result is 00:00. Huh?
Please, could someone tell me what I'm doing wrong here?
Greetings of the season!
Marcos
Hello
Check this thread.
It describes a solution for this kind of calculation.
-
Hello
I am trying to create a comparison of time for a site I am building.
I have the following so far<? PHP
$date = $_POST ['daydropdown'];
$month = $_POST ['monthdropdown'];
$year = $_POST ['yeardropdown'];
$datevalue = "" $date / $mois / $année ";"
$booking = strtotime ("now + 24 hours');
If ($date_value > $booking)
ECHO ("Don");
on the other
ECHO ("' tut tut '");
? >
that pulls its information from date of
< do action = "timetest.php" method = "post" > "
< table >
< b >
< class td 'tableheight' = >
Part size < table >
< td >
< select name = "partysize" size = "1" id = "partysize" >
< option > 1 < / option >
< option selected = "selected" > 2 < / option >
< option > 3 < / option >
< option > 4 < / option >
< option > 5 < / option >
< option > 6 < / option >
< option > 7 < / option >
< option > 8 < / option >
< option > 9 < / option >
< option > 10 < / option >
< option > 11 < / option >
< option > 12 < / option >
< option > 13 < / option >
< option > 14 < / option >
< option > 15 < / option >
< option > 16 < / option >
< option > 17 < / option >
< option > 18 < / option >
< option > 19 < / option >
< option > 20 < / option >
< / select >
< table >
< /tr >
< b >
< class td 'tableheight' = > Date < table >
< td >
< select name = "daydropdown" id = "daydropdown" >
< / select >
< select name = "monthdropdown" id = "monthdropdown" >
< / select >
< select name = "yeardropdown" id = "yeardropdown" >
< / select >
< table >
< /tr >
< b >
< class td 'tableheight' = > time < table >
< td > < select name = "time" >
< option > 12:00 < / option >
< option > 12:15 < / option >
< option > 12:30 < / option >
< option > 12:45 < / option >
< option > 13:00 < / option >
< option > 13:15 < / option >
< option > 13:30 < / option >
< option > 13:45 < / option >
< option > 14:00 < / option >
< option > 14:15 < / option >
< option > 14:30 < / option >
< option > 14:45 < / option >
< option > 15:00 < / option >
< option > 15:15 < / option >
< option > 15:30 < / option >
< option > 15:45 < / option >
< option > 16:00 < / option >
< option > 16:15 < / option >
< option > 16:30 < / option >
< option > 16:45 < / option >
< option > 17:00 < / option >
< option > 17:15 < / option >
< option > 17:30 < / option >
< option > 17:45 < / option >
< option > 18:00 < / option >
< option > 18:15 < / option >
< option > 18:30 < / option >
< option > 18:45 < / option >
< option > 19:00 < / option >
< option > 19:15 < / option >
< option > 19:30 < / option >
< option > 19:45 < / option >
< option > 20:00 < / option >
< option > 20:15 < / option >
< option > 20:30 < / option >
< option > 20:45 < / option >
< option > 21:00 < / option >
< option > 21:15 < / option >
< / select > < table >
< /tr >
< b >
< class td 'tableheight' = > name < table >
< td > < input name = "FirstName" type = placeholder "text" = "your name" / > < table > "
< /tr >
< b >
< class td 'tableheight' = > name < table >
< td > < input name = "name" type = placeholder "text" = "Your name" / > < table >
< /tr >
< b >
< class td 'tableheight' = > email < table >
< td > < input name = "email" type = "email" placeholder = "Your Email address" / > < table >
< /tr >
< b >
< class td 'tableheight' = > confirm Email < table >
< td > < input name = "confirm" type = "email" space reserved = 'Confirm Email' / > < table >
< /tr >
< b >
< class td = 'tableheight' > < table > Contact number
< td > < input name = 'contactnumber' type = 'text' = 'Your Contact number' placeholder / > < table >
< /tr >
< b >
< style td = "padding-top: 0px" > < input name = "Book now" type = "submit" value = "Book now" / > < table >
< td > < table >
< /tr >
< /table >
< / make >
< script type = "text/javascript" >
populateDropDown (id_of_day_select, id_of_month_select, id_of_year_select)
{Window.OnLoad = Function ()}
populateDropDown ("daydropdown", "monthdropdown", "yeardropdown")
}
< /script >
What I want to do is if a reservation for a table for more than 24 hours in advance so its fine and sends the booking at the restaurant where the 'beautiful' alias as if its for in the next 24 hours then ' tut tut ' told to ring the restaurant.
Someone at - it guidance for me please.
GI played around with it and I think he does have to do with the date of formatting that you use. If the date I pass the chain both use words for the month (January 1, 2011), like January, strtotime runs into an error.
If instead you pass all the numbers for the date (01/01/2011), it will work fine.
So, if your form passes the month as a word rather than numerical representation (01 for January, 02 Feb), you must convert the month of the number text before putting it in the strtotime function.
Good luck.
-
calculation of time under a form
I have a form, I can't understand how to calculate time I have 6 boxes, in that I need to put some time and the box 7 would be the total time.
This form is used to our fire department to show the trucks in road - to - stage time - to-another sure - to - left scene - to - service time... and then the total time in the final area I believe that subtract you all the time on the road in total. but I have no idea, I tried everything and can not understand. I can download the form if you need.
Thank you
I have attached an updated version of your form.
The time calculations are always a bit tricky, and it is one of the areas that I wish that Adobe would treat a little better. In this case, I assumed that you are using 24-hour time formats. Calculation of the difference is a bit tricky, since shopping can extend to midnight and the end time value will be smaller than the start time. The simplest method is fairly rudimentary: calculate the hours and minutes separately and adjust if the time extend to midnight.
In the attached form, I made the first column for you. There are new javascript in the case to calculate cell TotalTime910. You should be able to copy this script and paste it into the Calculate event to other cells TotalTime; the only change you'll need to do is to change when the startTime and endTime values are extracted. For example, for the TotalTime911 cell, we will use the Row2.enroute911 and Row6.InService911 fields.
Don't forget to change the drop-down list JavaScript language when you paste in each event.
Also, I changed the models of cell for the cells in the column 910: null} | NUM 9999 {}. This will display the values in the right format of 24 hours, for example 0200 at 02:00. If it works for you, copy the model in other cells in the table. I eliminated the zero {} template because it causes midnight you should see a white; It should be displayed as 0000.
Finally, all this falls apart if you are on-site 24 hours. In this case you will need the date and time to make it work. I hope that nothing in your town will burn so long.
-
Help with the calculations of time
I tried several searches but can't seem to find what I need to do. I need to read a file with two columns, the first column is the time of an event. Then I need to calculate the time between each event (row). I know I have to use a loop to read the file but I cannot find any information on what the best way to calculate the time between each event so that I can get statistics such as average time per cycle, time since the last cycle, etc.. The only way that I can think is to read the file as a string and then parse time, but that doesn't seem like an effective way of doing things.
example: data.csv
08:00 10
08:12 8
10:00 2
11:12 3
Use '% <%H:%M> t' as format string instead. Capital T formats time as an absolute time, which according to your format is not what you are working with. The tiny t he reformatted as a relative timestamp and you should be able to calculate your time between events of.
Hope this helps,
Rob
-
Find the first and last record in a game and the calculation of time
I have the following table and data below,
CREATE TABLE AAA_CDR
(ACCTTYPE (1) NUMBER, MSID VARCHAR2(20 BYTE), ACCOUNTSESSION_ID VARCHAR2(64 BYTE), BEGINNINGSESSION NUMBER (1),)
SESSIONCONTINUE NUMBER (1), ACCT_MULTI_SESSION_ID VARCHAR2(64 BYTE), DATAOCTETCOUNTORIGINATING NUMBER (20), DATAOCTETCOUNTTERMINATING NUMBER (20), ACCTSESSIONTIME NUMBER (20));
-SQL statement that produces these data:
/ * Select msid, accountsession_id, beginningsession, sessioncontinue, ACCTTYPE, acct_multi_session_id,.
dataoctetcountoriginating, dataoctetcountterminating, acctsessiontime
OF AAA_CDR
where msid = "5C4CA98EAC4C."
ORDER BY acct_multi_session_id, accountsession_id, accttype
*/
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '190001E9', 1, 0, '100014E19775F169', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', '190001E9', 0, 0, '100014E19775F169', 47496, 182054, 70);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', ' 290001C 4', 1, 0, '100014E19E21F16C', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', ' 290001C 4', 0, 0, '100014E19E21F16C', 3278162, 17540714, 14152);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', 190001 FC', 1, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', 190001 FC', 0, 1, "100014E1A949316E", 682734, 2935111, 1553);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '190001FD', 0, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', '190001FD', 0, 1, "100014E1A949316E", 1821052, 9585090, 5368);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '190001FE', 0, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', '190001FE', 0, 1, "100014E1A949316E", 42012, 505004, 213);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '19000200', 0, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', 0, '19000200', 1, '100014E1A949316E', 50224, 144566, 729).
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '19000201', 0, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', 0, '19000201', 1, '100014E1A949316E', 62634, 378416, 392);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (1, '5C4CA98EAC4C', '19000202', 0, 0, '100014E1A949316E', 0, 0, 0);
Insert into AAA_CDR (ACCTTYPE, MSID, ACCOUNTSESSION_ID, BEGINNINGSESSION, SESSIONCONTINUE, ACCT_MULTI_SESSION_ID, DATAOCTETCOUNTORIGINATING, DATAOCTETCOUNTTERMINATING, ACCTSESSIONTIME)
Values (2, '5C4CA98EAC4C', '19000202', 0, 0, '100014E1A949316E', 1457286, 9141033, 7574);
commit;
I need to calculate the sum (dataeoctetcountoriginating) + sum (dataoctetcountterminating) for each session
It is average, but the beginning of the session and the end of the session, as below,
for each ACCT_MULTI_SESSION_ID and MSID
the beginning of the session is when the accttype = 1 and beginningsession = 1
and the end of the session is at this time the accttype = 2 and SESSIONCONTINUE = 0
1. collect the first accounting start CDR generated an event online for a user.
Collect CDR AcctType is 1 and beginning of Session is 1 according to MSID. In
also, see the value of the Acct-Multi-Session-ID field in the CDR.
2. collect all Accountants stop CDRs generated during this event the user online.
Collect CDR AcctType is 2 according to MSID and Acct-Multi-Session-ID.
If the value of Session continues on a CD - r accounting stop is 0, it indicates that this CDR
is the last CDR of accounting judgment that is generated during the event of the user's offline.
3. calculate the total volume of the user during this event online.
Add the values of the data fields Byte Count (termination) and data values
Fields byte (native) Count in the accounts collected stop CDRs together to get
the total volume of this event the user online.
How can I find each session, then calculate the sum of this session?
any help please
Published by: user11309581 on July 13, 2011 22:01Is that what you are looking for:
select acct_multi_session_id, max(ACCTSESSIONTIME)-min(ACCTSESSIONTIME) from AAA_CDR group by acct_multi_session_id
According to the DDL and DML you provided, this is the output I see:
ACCT_MULTI_SESSION_ID,MAX(ACCTSESSIONTIME)-MIN(ACCTSESSIONTIME) 100014E19E21F16C, 14152 100014E19775F169, 70 100014E1A949316E, 7574
-
Calculation of time after midnight
Hi all
I'm working on a worksheet of employee time. There are 4 time fields (amIN, amOUT, pmIN, pmOUT) to allow a lunch break. I have a script that calculates for the normal office hours. BUT, if the shift goes beyond midnight, then it does not calculate correctly.
Here's what I have in FormCalc in an event to calculate:
fullTime var = 0
var = 0 recreation
If (pmIN don't pmOUT null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") < Time2Num (pmOUT.formattedValue, "HH: mm")) then
full time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (pmOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
full time = 24 - Abs (Time2Num (pmOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
recess = Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
$ = fullTime - recreation
on the otherfull time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
$ = full time
If (amIN == null) then $= null else $= (full time - recess)
endifendif
Someone help me please?
Thank you
Gene-O
Ok
I changed the script so it will check if amIN's largest amOUT.
fullTime var = 0
var = 0 recreation
If (amIN don't pmOUT null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") lt Time2Num (pmOUT.formattedValue, "HH: mm")) then
full time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (pmOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
full time = 24 - Abs (Time2Num (pmOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
If (amOUT not null and not null pmIN) then
If (Time2Num (amOUT.formattedValue, "HH: mm") lt Time2Num (pmIN.formattedValue, "HH: mm")) then
recess = Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
recess = 24 - Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
endif
$ = fullTime - recreation
else if (null not amIN and amOUT pmIN eq eq pmOUT null null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") lt Time2Num (amOUT.formattedValue, "HH: mm")) then
$ = Abs (Time2Num (amOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
$ = 24 abs (Time2Num (amOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
on the other
$ = full time
endif
-
Calculation of time difference
Hi Experts,
I had separate columns for the date and time and have an obligation to calculate the time difference between them.
Examples of data as below.
_ Date ordered Date classified at the time as time released
27/04/2010 06:36 04/27/2010 08:21:55
27/04/2010 06:36 04/27/2010 07:07:29
27/04/2010 06:36 04/27/2010 07:07:29
27/04/2010 06:36 04/27/2010 07:07:29
27/04/2010 06:36 04/27/2010 07:07:29
How to calculate the time difference between ordered and distributed in minutes?
Published by: Sweta on April 27, 2010 04:34This gives a shot:
SELECT SOH_ORDER_NO , ( (SOH_DATE_RELEASED + TO_NUMBER(TO_CHAR(SOH_TIME_RELEASED,'SSSSS'))/(60*60*24)) - (SOH_DATE_CREATED + TO_NUMBER(TO_CHAR(SOH_TIME_CREATED,'SSSSS'))/(60*60*24)) )*24*60 AS DIFF_IN_MINUTES FROM SALES_ORDER
You should really think about change this data model if you can.
-
Hello
I had one query which took place in parallel. Now I want to know is the total execution but time of last snap 7621 who says he ran for 126 hours but I actually had not taken that much. So, how to calculate in real time.
Oracle 10.2.0.3
select snap_id ,px_servers_execs_total, elapsed_time_delta,elapsed_time_total,rows_processed_delta,rows_processed_total from dba_hist_sqlstat where sql_id='xxxxxxx' order by snap_id SNAP_ID PX_SERVERS_EXECS_TOTAL ELAPSED_TIME_DELTA ELAPSED_TIME_TOTAL ROWS_PROCESSED_DELTA ROWS_PROCESSED_TOTAL ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- 7607 0 4153020665 4153020665 0 0 7608 0 36977318939 41130339604 0 0 7609 0 37235891337 78366230941 0 0 7610 0 37284697558 115650928499 0 0 7611 0 36607129876 152258058375 0 0 7612 0 36039518358 188297576733 0 0 7613 0 34306595434 222604172167 0 0 7614 0 30405519446 253009691613 0 0 7615 0 30507144568 283516836181 0 0 7616 0 25704117849 309220954030 0 0 7617 0 30432670103 339653624133 0 0 7618 0 34781694387 374435318520 0 0 7619 8 31990802430 406426120950 0 0 7620 8 31560702139 437986823089 0 0 7621 16 16701287279 454688110368 1141685776 1141685776
NUMBER of ELAPSED_TIME_DELTA Delta value of time (in microseconds) used by this slider for parsing / execution/recovery
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/statviews_3183.htm
-
How to add or subtract 2 times, calculation with the calculator of windows 7?
For example:
I want to add 2 different times as follows. More time is with the format hours: Minutes: seconds.
H MM SS
01:50:31
+ 2:20:30
-------------------
04:11:01
How to perform this calculation of time with Windows 7 or any other Calculator calculator in Windows 7.
Response.
In your example:
First add the hours, the minutes and the dry separately
Hours = 1 + 2 = 3
MN = 50 + 20 = 70
Seconds = 31 + 30 = 61
Now, to calculate whole minutes because of the second column:
61 seconds/60 = 1.016 mins (approx.)
Ignore the bits after the comma, and add whole minutes in the minutes column:
MN = 70 + 1 = 71
Calculate the seconds remaining:
61. 60 = 1 second.
Now, calculate hours because of the minutes column:
71minutes/60 = 1.183 hours (approx.)
Ignore the bits after the comma and add hours to the column of the hours:
Hours = 3 + 1 = 4
Calculate the remaining minutes:
71 60 = 11 min.
That is why total is:
4 hours, 11 minutes, 1 second.
The calculator is not a huge help to make these kinds of calculations because it works in decimal which means he cannot directly calculate/convert seconds/minutes/hours located in several of the early 1960s. If you had a spreadsheet like Excel you could set up (with a little work) to do this kind of thing.
-
Time of calculation relative to the size of the db
Hello
I have a database with versions and various scenarios. I have an estimate every night (not just an aggregation) that runs on a scenario and version. As other versions and scenarios have been created, the size of the database has grown up a bit, and the nightly calculation every time develops new scenario/version data sets are created. Has always been my understanding that education fix limit the number of blocks in the calculation, and in theory, existing data in other intersections not being set to should have nothing to do with the calculation time. However, this is not my experience. I even tested out in app development by erasing all the data in 8 of the other versions and scenarios and saw my time reduced by 27%. Does anyone know why this should be? It comes to me that we save more historical copies of the data, the computing time on the active data will grow and develop.
We are currently implementing a BSO/ASO solution to reduce the data in the cube of the BSO, but I do not see why it should be necessary and want all overview of this.
Thank you
SabrinaYou can be calculate on these blocks, but the charge of these operations increases grows the database
Whenever he has to calculate on a block, it must go in the index file - find the location of the block in the .pag file, and then open the .pag file and integrate this memory block.
I am not opposed to the segregation of historical data which is not often used and which moving a cube separated from a design perspective, and it probably would be a good idea if the cycle on your calcs time take forever.
You can try and improve performance by changing the cache settings - but that is performance tuning and is beyond the scope of your original question.
-Matt
Maybe you are looking for
-
Help, all my favorites have disappeared. Cannot access
After being on holiday, I can't access my bookmarks bar. Even if I try B cltrl shft prompt.Why can't I just click on the bookmarks bar and see all my boookmarks important?
-
I never use this app on my phone.
-
Satellite C660 - 1-2 - game impossible due to the low RAM
Hello I bought this year model C660 - 1 2 (intel core I3 processing) RAM is 2 + 1, max of 8 Now, children wants to play games, and we see the need video is _256MB. _We discover only _64MB_ available for video memory. * Please, *.* How we can extend t
-
Atrix 4 G, Email Corp. cannot download attachments, connection errors
our company uses exchange 2010 w / active sync for phones. I currently have an atrix 4g users, and it will not download attachments in app email stock that I tried on 4 networks various wifi and on ordinary cell data. I changed the network ap to at &
-
When using paint how to edit text without losing the background image
I'm trying to edit text on a picture and it has a background, I don't want to lose the bottom. How can I do this using paint?