How time rounding up to the nearest half an hour?
Hi all
I have already received excellent and very competent assistance in these forums and hope to have this problem be solved, so...
The Setup is a built in Acrobat 9.1.3 Acroform
This concerns a situation where the user between a 'start' and 'end' time for a given event and the result is calculated in a decimal number - this does not work properly.
The issue is having the time calculated to round to the nearest half-hour, making the number decimal either x.0 x.5
Thanks in advance
/ Morten
In this case, you can use the code in my first post. It does exactly that.
Tags: Acrobat
Similar Questions
-
Round numbers to the nearest thousand
Is there a way to round numbers to the nearest thousand in Livecycle Designer ES?
EVENT CALCULATE CALCULATE...
I can try something on formcalc too... Although there is no difference between javascript and formcalc in your case
Here you go with formcalc:
Tower of ((SubTotal + OtherCharge1 + OtherCharge2 + OtherCharge3)/1000) * 1000
-
Round stamp to the nearest hour
Hi all
I would like to turn stamp to the nearest hour. Example:
21/01/2015 18:51-> 21/01/2015, 19:00
21/01/2015 18:21-> 2015-21/01 18:00
Suggestions how I can make it work properly? Thanks in advance.
Kind regards
Niek
Hi Niek,
With a Script processor, you can use this:
var date = input1 [0];
If (date! = null)
{
date.setTime (Math.round (date.getTime () / 3600000) * 3600000);
Output 1 = date;
}
see you soon,
Nick
-
How to get figure to the nearest penny?
I want to calculate the average cost of holiday and then round this number to the nearest cent (or two decimal places). Here is my code to find the average.
It works fine, but the result is 1201.3333333333333select avg(IT220_HOLIDAYDETAILS.HOLCOST) as "HOLCOST" from "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
I tried to use the rounded, but he did that take all decimals off of all. I want to round to two decimal places, is there a way to do this?
Thanks in advance!
Published by: Jay on November 17, 2010 04:06Hi Jay
You need this...
select round(avg(IT220_HOLIDAYDETAILS.HOLCOST),2) as "HOLCOST" from "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
Either this...
select to_char(avg(IT220_HOLIDAYDETAILS.HOLCOST),'9999.99') as "HOLCOST" from "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
Caveat even as my previous posting on the use of the TO_CHAR version.
See you soon
Ben
Published by: Munky on November 17, 2010 12:39 - typo!
-
Server time and time local (Dreamweaver) off the coast of 1 hour
How can I get Dreamweaver to show me the correct timestamp on my files on the server and my local computer? When I telnet on my server, the time stamp on the files is correct. My server time is correctly set to He (GMT-5). My local computer time is set correctly. I asked my sysadmin if PureFTP has all zone settings and sysadmin told me that all my server time and time zones are specific. My sysadmin says that Drwamweaver is the culprit.
I lived with this for a long time, but it is extremely annoying and I would like to address.
I searched high and low in the option settings in Dreamweaver for a sort of zone setting or offset - found nothing.
Someone knows a problem of out-of-sync of 1 hour between real time stamp file on the server and what Dreamweaver it shows in the display of remote/Local files?
Thank you.
During the hour.
http://forums.Adobe.com/message/3545349#3545349
Nancy O.
ALT-Web Design & Publishing
Web | Graphics | Print | Media specialists
http://ALT-Web.com/
http://Twitter.com/ALTWEB -
How to go down to the nearest multiple of Labview
I am trying round my data down to a given multiple. Is it possible to do in Labview? I use Student Edition 2009 if it's relevant.
Thanks in advance.
-
Timesheet to round up to the quarter of an hour
I have this timesheet that has four 'In' and 'Out' 4.e and calculates hours worked in a pay period in two weeks. There is a column on the right that calculates the hours of work for the day (see text below). I need to round to a quarter of an hour, i.e.,.
If an employee arrives or leaves between:
": 00"to": 07" minutes after the hour, calculated from the end of the hour. "
': 08 'to': 22 "minutes after the hour, calculate the quarter past the hour.
': 23 'to': 37 "minutes after the hour, calculated from the half hour.
": 38 'to': 52" minutes after the hour, calculate three quarters after the hour.
": 53 'to': 60" minutes after the hour, calculated from the end of the hour. "
Examples:Calculate an employee records that they arrived at 08:07 from 08:00
Calculate an employee records that they arrived at 08:08 from 08:15
Calculate an employee records that they arrived at 08:22 from 08:30
Calculate an employee records that they arrived at 08:37 from 08:45
Calculate an employee records that they arrived at 08:53 from 09:00
Script in the column "hours worked".
calculate block 0
var StartInterval = 0
If (HasValue(OUTA1[0]) and HasValue(INA1[0])) then
StartInterval = Time2Num (OUTA1 [0] .formattedValue, "HH: mm")-Time2Num (INA1 .formattedValue [0], "HH: mm")
endif
calculate block 1
var LunchInterval = 0
If (HasValue(OUTA1[1]) and HasValue(INA1[1])) then
LunchInterval = Time2Num (OUTA1 .formattedValue [1], "HH: mm")-Time2Num (INA1 .formattedValue [1], "HH: mm")
endif
calculate block 2
var EndInterval = 0
If (HasValue(OUTA1[2]) and HasValue(INA1[2])) then
EndInterval = Time2Num (OUTA1 .formattedValue [2], "HH: mm")-Time2Num (INA1 .formattedValue [2], "HH: mm")
endif
calculate the total time in hours from the value in milliseconds
Round (sum (StartInterval, LunchInterval, EndInterval) / 3600000,2)I know that in excel I can use = (ROUND(B2*96, 0)/96)-(ROUND(A2*96, 0)/96) to get the results I want. So I tried to get into something similar in FormCalc script but without success. If you could tell me what I need to do to make this work, I would be very grateful. Thank you, Derrick
Even better for the other possible problems...
var timeStamp
var timeout
timeIn var
var Cat
var timep1
var timep2
var timep3
var timep4var StartInterval
If (HasValue ($.parent.)) OUTA1 [0]) and HasValue ($.parent.) INA1 [0])) then
timeStamp = $.parent. OUTA1 .formattedValue [0]
Cat = At(timeStamp,":")
timep1 = (timestamp, Cat-1) Left
timep2 = Right (timeStamp, len (timeStamp) - Cat)timeStamp = $.parent. INA1 .formattedValue [0]
Cat = At(timeStamp,":")
timep3 = (timestamp, Cat-1) Left
timep4 = Right (timeStamp, len (timeStamp) - Cat)If (Ceil (timep1)< ceil(timep3))="">
timep1 = timep1 + 12
If (timep1<= 9)="">=>
timep1 = Concat ("0", timep1)
xfa.host.messageBox (timep1)
endif
endifIf (Ceil (timep2) > = 0 and Ceil (timep2))<= 7)="">=>
timeOut = Concat (timep1, ":", "00")
endif
If (Ceil (timep2) > = 8 and Ceil (timep2))<= 22)="">=>
timeOut = Concat (timep1, ":", "15")
endif
If (Ceil (timep2) > = 23 and Ceil (timep2))<= 37)="">=>
timeOut = Concat (timep1, ":", "30")
endif
If (Ceil (timep2) > = 38 and Ceil (timep2))<= 52)="">=>
timeOut = Concat (timep1, ":", "45")
endif
If (Ceil (timep2) > = 53 and Ceil (timep2))<= 59)="">=>
timep1 = timep1 + 1
If (timep1<= 9)="">=>
timep1 = Concat ("0", timep1)
xfa.host.messageBox (timep1)
endif
timeOut = Concat (timep1, ":", "00")
endifIf (Ceil (timep4) > = 0 and Ceil (timep4))<= 7)="">=>
timeIn = Concat (timep3, ":", "00")
endif
If (Ceil (timep4) > = 8 and Ceil (timep4))<= 22)="">=>
timeIn = Concat (timep3, ":", "15")
endif
If (Ceil (timep4) > = 23 and Ceil (timep4))<= 37)="">=>
timeIn = Concat (timep3, ":", "30")
endif
If (Ceil (timep4) > = 38 and Ceil (timep4))<= 52)="">=>
timeIn = Concat (timep3, ":", "45")
endif
If (Ceil (timep4) > = 53 and Ceil (timep4))<= 59)="">=>
timep3 = timep3 + 1
If (timep3<= 9)="">=>
timep3 = Concat ("0", timep3)
xfa.host.messageBox (timep1)
endif
timeIn = Concat (timep3, ":", "00")
endifStartInterval = Time2Num (timeout, "HH: mm")-Time2Num (timeIn, "HH: mm")
on the other
StartInterval = 0
endifvar LunchInterval
If (HasValue ($.parent.)) OUTA1 [1]) and HasValue ($.parent.) INA1 [1])) then
timeStamp = $.parent. OUTA1 [1] .formattedValue
Cat = At(timeStamp,":")
timep1 = (timestamp, Cat-1) Left
timep2 = Right (timeStamp, len (timeStamp) - Cat)timeStamp = $.parent. INA1 [1] .formattedValue
Cat = At(timeStamp,":")
timep3 = (timestamp, Cat-1) Left
timep4 = Right (timeStamp, len (timeStamp) - Cat)If (Ceil (timep1)< ceil(timep3))="">
timep1 = timep1 + 12
endifIf (Ceil (timep2) > = 0 and Ceil (timep2))<= 7)="">=>
timeOut = Concat (timep1, ":", "00")
endif
If (Ceil (timep2) > = 8 and Ceil (timep2))<= 22)="">=>
timeOut = Concat (timep1, ":", "15")
endif
If (Ceil (timep2) > = 23 and Ceil (timep2))<= 37)="">=>
timeOut = Concat (timep1, ":", "30")
endif
If (Ceil (timep2) > = 38 and Ceil (timep2))<= 52)="">=>
timeOut = Concat (timep1, ":", "45")
endif
If (Ceil (timep2) > = 53 and Ceil (timep2))<= 59)="">=>
timep1 = timep1 + 1
If (timep1<= 9)="">=>
timep1 = Concat ("0", timep1)
xfa.host.messageBox (timep1)
endif
timeOut = Concat (timep1, ":", "00")
endifIf (Ceil (timep4) > = 0 and Ceil (timep4))<= 7)="">=>
timeIn = Concat (timep3, ":", "00")
endif
If (Ceil (timep4) > = 8 and Ceil (timep4))<= 22)="">=>
timeIn = Concat (timep3, ":", "15")
endif
If (Ceil (timep4) > = 23 and Ceil (timep4))<= 37)="">=>
timeIn = Concat (timep3, ":", "30")
endif
If (Ceil (timep4) > = 38 and Ceil (timep4))<= 52)="">=>
timeIn = Concat (timep3, ":", "45")
endif
If (Ceil (timep4) > = 53 and Ceil (timep4))<= 59)="">=>
timep3 = timep3 + 1
If (timep3<= 9)="">=>
timep3 = Concat ("0", timep3)
xfa.host.messageBox (timep1)
endif
timeIn = Concat (timep3, ":", "00")
endifLunchInterval = Time2Num (timeout, "HH: mm")-Time2Num (timeIn, "HH: mm")
on the other
LunchInterval = 0
endifvar EndInterval
If (HasValue ($.parent.)) OUTA1 [2]) and HasValue ($.parent.) INA1 [2])) then
timeStamp = $.parent. OUTA1 .formattedValue [2]
Cat = At(timeStamp,":")
timep1 = (timestamp, Cat-1) Left
timep2 = Right (timeStamp, len (timeStamp) - Cat)timeStamp = $.parent. INA1 .formattedValue [2]
Cat = At(timeStamp,":")
timep3 = (timestamp, Cat-1) Left
timep4 = Right (timeStamp, len (timeStamp) - Cat)If (Ceil (timep1)< ceil(timep3))="">
timep1 = timep1 + 12
endifIf (Ceil (timep2) > = 0 and Ceil (timep2))<= 7)="">=>
timeOut = Concat (timep1, ":", "00")
endif
If (Ceil (timep2) > = 8 and Ceil (timep2))<= 22)="">=>
timeOut = Concat (timep1, ":", "15")
endif
If (Ceil (timep2) > = 23 and Ceil (timep2))<= 37)="">=>
timeOut = Concat (timep1, ":", "30")
endif
If (Ceil (timep2) > = 38 and Ceil (timep2))<= 52)="">=>
timeOut = Concat (timep1, ":", "45")
endif
If (Ceil (timep2) > = 53 and Ceil (timep2))<= 59)="">=>
timep1 = timep1 + 1
If (timep1<= 9)="">=>
timep1 = "" + Concat ("0", timep1) ".
xfa.host.messageBox (timep1)
endif
timeOut = Concat (timep1, ":", "00")
endifIf (Ceil (timep4) > = 0 and Ceil (timep4))<= 7)="">=>
timeIn = Concat (timep3, ":", "00")
endif
If (Ceil (timep4) > = 8 and Ceil (timep4))<= 22)="">=>
timeIn = Concat (timep3, ":", "15")
endif
If (Ceil (timep4) > = 23 and Ceil (timep4))<= 37)="">=>
timeIn = Concat (timep3, ":", "30")
endif
If (Ceil (timep4) > = 38 and Ceil (timep4))<= 52)="">=>
timeIn = Concat (timep3, ":", "45")
endif
If (Ceil (timep4) > = 53 and Ceil (timep4))<= 59)="">=>
timep3 = timep3 + 1
If (timep3<= 9)="">=>
timep3 = Concat ("0", timep3)
xfa.host.messageBox (timep1)
endif
timeIn = Concat (timep3, ":", "00")
endifEndInterval = Time2Num (timeout, "HH: mm")-Time2Num (timeIn, "HH: mm")
on the other
EndInterval = 0
endifcalculate the total time in hours from the value in milliseconds
Round (sum (StartInterval, LunchInterval, EndInterval) / 3600000,2) -
How to round a number to a specific value and not to a certain number of decimal places
Hello
I'd round up the numbers according to a grid.
Let's say I have a grid of 6 between 3 and 4 (3.0 3.2 3.4 3.6 3.8 4.0)
I'd round up to the nearest number in the grid, so if I choose 3.7125, it will turn to 3.8.
I found already in the forum how to round decimal degree, but not in my approach.
You know to force rounding to the nearest of the grid.
I thought a ramp up to make the grid then interpolate the number and use its index to round. But I don't know that there is a much easier way.
Thank you
Zied
These ideas, everything seems to work if you try to round up to a set of specific values. But you must set specific values for all the possibilities.
If you want to round to a given interval, there is an easier way to do it.
If you want to round each 0.2. Divide your number of this interval. Round to the nearest integer. Multiply your number of this interval.
If you need to force a number less than or greater than a given to be in this range, such as having range 1.255 round up to 3, then put a stove and Coerce before or after this piece of code.
-
Round time to the nearest minute of you
Hello
Is there a simple way to round off a date/time to the nearest Minute?
Example: 22/03/2013 10:23:35 rounded to 22/03/2013 10:24
22/03/2013 10:23:29 rounded to 22/03/2013 10:23
I could just compare the seconds at 30 and round to the Minute or Minute + 1 but I would have to manage the change of day/month/year
Thank you
User
User79 wrote:
Hello
Is there a simple way to round off a date/time to the nearest Minute?
Example: 22/03/2013 10:23:35 rounded to 22/03/2013 10:24
22/03/2013 10:23:29 rounded to 22/03/2013 10:23
I could just compare the seconds at 30 and round to the Minute or Minute + 1 but I would have to manage the change of day/month/year
Thank you
User
Here's a way to do it.
Ben64
-
How to round to the nearest dollar total?
I have a form that multiplies the number of items per $6.07 but I need the total to round to the nearest dollar. I formatted the total field to be whole and entire selected tab link, who works to give up the hundred in total, but is not helping round up. I suspect that a script is required to achieve this. How can I write this script?
Thanks for your help.
You will want to use the Ceil function, which returns the next higher whole number expression, therefore;
Ceil (table2. Row8.eight * 6.07)
Just note that it will be only for positive numbers, if you have to deal with negative numbers (perhaps a refund), then you will need to use the Floor function.
Concerning
Bruce
-
number rounded to the nearest integer in Excel
Hello everyone.
I use an entry in the file of worksheet to export my Excel (csv format) table, but it rounds the number to the nearest integer.
How can I solve this problem?
My VI is uploadet
Thanks in advance
Orlando
-
How can I get all the tabs I had last time?
When I closed my browser and all tabs, then open the browser, it didn't restore my session or give the ability to restore, I restore the tabs from last time checked. I really need to restore this session, he had very important tabs that I remember no addresses for, and they aren't in the story because I do not charge some of them for a long time. Is it possible to restore?
Hi bncase, how long were you watching the important tabs open? You may well have some backups of sessionstore.js and/or sessionstore.bak containing at least some of the tabs. You might be able to restore to another location and take a look inside.
Another possibility is to try the "Previous Versions" feature See: http://windows.microsoft.com/en-US/windows7/Previous-versions-of-files-frequently-asked-questions when you do a right click either sessionstore.bak or sessionstore.js and click the previous Versions tab are available in format properties you can find. Since I find the system restore to be a tad bit reliable, it's probably a good idea to save all the current files that you can load it again before restoring previous versions. As always, make sure that Firefox is closed before you restore or your changes are likely to be replaced soon.
-
My iPhone was stolen. How can I check when the last time that I backed up my phone to my laptop without my iPhone?
Click here and either use iTunes to check or browse to the path of the backup manually.
(142338)
-
I just bought an iphone 6 more, how long should I charge the first time?
IPHONE 6 MORE
64 GB
I just bought an iphone 6 more. How long can I collect the first time thank you!
You can load for however long you want or have time for. Lithium-ion batteries must be completely loaded or empty completely before using it.
See this article for more information support:
-
I would check my story for the time of day, as well as for the date. This is a feature that is common? How can I configure to work indicating the time, as well as, the date? Thank you.
If it's a history item to the current day, then you will see the time and not the date.
You can show more columns in the library (history > show history)
Maybe you are looking for
-
The police in my e-mail suddenly disappeared so small that I can't read.
I have an email account with TalkTalk who went well for a few years. I get it through Firefox.Yesterday when I went in my mail the police, it was so small that I couldn't read.I phoned Talktalk who said that it was a fault with Firefox and this was p
-
I'm trying to import my IE Favorites and have read the instructions, but the import button in the file in gray and will not let me import. Any ideas?
-
I downloaded the latest update for my iphone 6. Siri now does not work. Is there a link?
-
Motor action cluster loses data
I have a strange problem that I work on. When my AE executes a certain method, the data that I am trying to regroup in the cluster are lost. I use this model of design for all my drawings of AE but have never seen this problem before. When the wave
-
OfficeJet 6700: Printer wrong paper and economicus jam
Hello. First I'm sorry for my bad English, I hope that you will understand me. my printer suddenly started to take the book evil and cause a jam whenever I feel. I cleaned up the jam, checked for any other piece of paper inside and reset to the print