Adding hrs and minutes to time
Hi guys, I currently have a problem where I have two date fields with time stamps. The only bit i am currently interested in in these fields is the time factor. When i display them in their field they have a format of HH24:MI .
I have a start time and end time as well as a duration and duration type. What I am trying to do is the following: when the user inputs the start time, along with the duration say 1 for example and the duation type of say HRS for example I would like to have the end_datetime default to 1 HR from the current start time. This is the code I use on a when validate item trigger to acheive this:
case :blk.duration_type
when 'HRS' then
:blk.end_datetime := :blk.start_datetime + ((1/24)* :blk.duration);
when 'MINS' then
:blk.end_datetime := :blk.start_datetime + ((1/24/60)* :blk.duration);
However, everytime it triggers the value put into end_datetime is 0:00 is it something to do with the datatypes im using or would anyopne have a solution to this problem? any help would be very much appreciated.
Hi user13390506
if you post again below I will mark you with a correct answeru can modify it to be Correct Still has a chance ... :)
Ahmed Deserve it he helps so many people here and also most of the Top users here Like Andreas,Francois, Sarah and others...
@ Ahmed if u don't care about points but it is indicator to the OP that this info is works and also this person is distinctive and has many helpful and correct answer.
i always pray to god to let all and every work in our life to his sack (Allah's Sack) just to have Hasanat and this is the real thing that worth.
Pls Remember that one's work is one of the things that may beneficiate to oneself after death if and only if it is useful to other people and that's what i am trying to work on ... :)
Best Regards,
Abdetu...
Similar Messages
-
Converting seconds to hrs, and minute
I have never used function, is there a way to convert without using the declare...
Hi,
I have three columns, hour(s), min(s), sec(s)
I can add it up, but will like to convert it into. hrs, mins and sec.
this is how, i am adding it up into seconds.
SELECT ((TotalTimeSpentHrs*60*60)+(TotalTimeSpentMin*60)+(TotalTimeSpentSec))AS totaltime
FROM EST1
how can I convert it. thanksuse a function like this
CREATE FUNCTION GetTimeParts
@Seconds int
RETURNS TABLE
AS
RETURN
SELECT @Seconds/3600 AS HourPart,
(@Seconds%3600)/60 AS MinutePart,
(@Seconds%60) AS SecondPart
GO
Then we can invoke it like
SELECT * FROM dbo.GetTimeParts(144072)
which means 144072 seconds equivalent to
HourPart MinutePart SecondPart
40 1 12
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
i get it , what of if i want to populate a column in a table with the result, what variable will a pass into
SELECT * FROM dbo.GetTimeParts(xxxxxxx)say the column name is timespent
What you asked for was 3 columns in output. How do you store it in a single column?
Or do you mean you want single value as xx hours yy minutes zz seconds?
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
yes i mean, mean you want single value as xx hours yy minutes zz seconds? -
Hi, I've looked through a few pages of search, but couldn't find an answer to my question.
I have a table that I need to calculate hours worked. Say A1 is 2hours and 35 minutes, A2 is 17 hours and 43 minutes and A3 is 12 hours and 20 minutes. Now I want A4 to give me the total of working hours for this month i.e. A1A2A3= HH:MM
Can somebody help me with this?
Thank you.Hello
You made a very simple error:
My formula was built to compute the sum of time values in row 14 as you asked for.
As it is coded, *_it must be in row 14_.*
This kind of coding gives a shorter formula.
=(INT(TIMEVALUE(B)TIMEVALUE(C)+TIMEVALUE(D)+TIMEVALUE(E)+TIMEVALUE(F))24+INT(MOD(TIMEVALUE(B)+TIMEVALUE(C)+TIMEVALUE(D)+TIMEVALUE(E)+TIMEVALUE(F);1)*2 4))&":"&ROUND(60*MOD(MOD(TIMEVALUE(B)+TIMEVALUE(C)+TIMEVALUE(D)+TIMEVALUE(E)TIMEVALUE(F);1)24;1);0)
If you want to put it in an other row, it must be:
=(INT(TIMEVALUE(B14)TIMEVALUE(C14)+TIMEVALUE(D14)+TIMEVALUE(E14)+TIMEVALUE(F14))24+INT(MOD(TIMEVALUE(B14)+TIMEVALUE(C14)+TIMEVALUE(D14)+TIMEVALUE(E14)+TIMEVALUE (F14);1)*24))&":"&ROUND(60*MOD(MOD(TIMEVALUE(B14)+TIMEVALUE(C14)+TIMEVALUE(D14)+ TIMEVALUE(E14)TIMEVALUE(F14);1)24;1);0)
An other interesting feature of this kind of formula is that it would be the same when summing values in row 18 or in row 97.
You are right on one point: Before working as a potter, I was an engineer.
But when I buitl the two sheets's responce, I used functions which are new for me which used AppleWorks for years.
Numbers is a new concept of spreadsheet. It offers a very powerfull documents structure, more functions than AppleWorks (but sadly it dropped some of them) and it is far from the "more than 500 functions available in XL".
Alas, it is very slowwwwwwwwwwwwwwwwwwwww
Yvan KOENIG (from FRANCE mercredi 2 janvier 2008 10:51:24) -
Converting days into hours and adding this hour to the time
Hi Gurus!
I ahve a query that outputs the total time between two periods in one column , total number of days between two periods in onne column. I want to combine those together and show it in hours . For example if the time column shows 7:41(7 hours and 41 minutes ) and teh days column shows 1 day , I want to combine those two columns and show as one column i.e 24 hours plus 7 hours and 41 minutes as a total of 31 hours and 41 minutes. I had written the follwwing code in the query that calculated the two seprately , can anyone please tell me how to go about converting this hour into time format and then adding the two to get it in total number of hours and minutes in my query.
concatenate vttk-datbg vttk-uatbg into lv_start_time.
concatenate vttk-daten vttk-uaten into lv_end_time.
gv_ftstm = lv_end_time - lv_start_time.
gv_total_time = gv_ftstm+8(6).
if not ( vttk-datbg is initial
or vttk-daten is initial ).
gv_total_days = gv_ftstm+0(8).
else.
clear: gv_total_days.
endif.
if not p_bl_lns is initial.
read table gt_vttk with key tknum = vttk-tknum.
if sy-subrc <> 0.
append vttk to gt_vttk .
else.
clear: vttk-distz,
vttk-gesztda,
vttk-fahztda,
vttk-warztda,
gv_total_days,
gv_total_time.
endif.
endif.
The gv_total_days have been declared as type P lenght 6, outlenth 10 and decimal 02, and
gv_time as VTTK-FAHZTDA.
ThnaksDoes this help ?
CONVERT DATE par_date TIME par_time INTO
TIME STAMP par_timestamp TIME ZONE par_time_zone.
also use fm: SD_DATETIME_DIFFERENCE
01/01/2009
12:00:00
01/02/2010
11:00:00
output: 365
23
365 * 24 = tine in Hrs + 23 hrs -
Adding 18 hrs to a Date/Time column
Hi All
Power Query provides the functionality to add days to a Date/Time column with the " Date.AddDays()" function. However this appears to only accept whole numbers as inputs.
I want to add 18 hrs to a Date/Time column How can I do this?
Cheers
SteveI was able to achieve this by converting the date into a number, adding 0.75 and then converting back into a date.
Here is the code, source is just a workbook with the following data
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
AddC= Table.AddColumn(Source, "Time", each Number.From([DateTime])),
ValueAdd = Table.AddColumn(AddC, "Custom", each [Time] + 0.75),
HoursAdded = Table.AddColumn(ValueAdd, "Time +18", each DateTime.From([Custom]))
in
HoursAdded
Final Output
Would be interested if there is a more elegant alternative -
My iPhone 4 with iOS 6 is making me start to hate Apple. Any App and at any time I open and I can not view it or move for more than 2 minutes, they close themselves. During connections, it also gives this problem and the signal disappears after a few seconds back but often the person on the other end has hung up ... I can not stand it anymore, someone suggests something?
Besides these problems, there is the battery, which was bad got worse, she is not lasting more than 10 hours, even without using the phone.
Sometimes it even seems that the problem was solved, but my joy did not last long after I celebrate all the problems return, is incredible ...
thanks.
Sorry my bad Inglês.Try a reset hold home/sleep buttons until Apple logo appears
If that does not improve try a restore
http://support.apple.com/kb/HT4137
For your information
We are NOT Apple here we are all users helping other users
so emotion is ignored -
How do I get a time value in days, hours and minutes returned to a cell from a calculation of distance divided by speed?
Simon,
you can use the duration function:
B4=DURATION(0,0,B1/B2)
you can further, format the cell as a duration like this using the cell inspector: -
Is it possible to get 15 minute appointment times on the calender without them all bunching up and being unable to follow?
I am wanting to replace all my PC's with Macs, ipads and iphones for my business.
I love the whole system but as a small Physio business, I need to be able to add 15min & 20min appointments to the callendar and share with my colleagues.
The problem I have is that they just bunch up and overlap and it becomes impossible to follow. There is no way of telling if you have any appointment spaces as it no longer shows the gaps. Also, are you able to set a default time for the appointments as it currently defaults to 1 hour (small pain in the arse but thought i'd ask while i'm here)
If there is a way to do this or if there is any other apps out there, I'm sure it would become a very useful business tool and many more small businesses would invest in Apple systems, I've talked it through with friends with other businesses and they agree.
Anybody have any solutions, or do Apple fancy making some simple upgrades to the software?
Thanks
MarkYep, that's basically what I'm trying to to detect JJ; which layers overlap the blue area would be the ideal result. Which objects overlap the blue layer's bounds is an ok method, but not 100% accurate (as demonstrated by your example). The bounds method does narrow down what layers I need to check it against, but it still returns 2 layers I need to then take extra time to check against for the actual overlap, which wouldn't be necessary if we can get the check more detailed.
Since a more detailed way of getting the overlaps is still being looked into, I'm thinking of using EnsilZah's and/or c.pfaffenbichler's suggestions in tandem with some code they helped me with previously (here: http://forums.adobe.com/message/6256651#6256651 ) to get the actual overlaps by process of elimination on a narrowed return result using current suggestions; at least until a better/more efficient solution comes along. I am still open to other ideas, on this topic, though. -
I have just bought McSudoku and it quits after about a minute every time. How do I correct it or get a refund?
I am logged into the same things on both my iPhone and my MacBook Pro, except for mail. I use a gmail IMAP account and everything there already works on both machines. The iCloud account on my iPhone uses one Apple ID and the one on the Mac uses the second Apple ID.
-
Calculate End Time from a Start Time and Minutes Allocated
Hello,
I have a meeting form which needs to have the finish time calculated from a start time and allocated time (in minutes).
The allocated time is a text field with the default of "00:00". The user can then enter the number of minutes for the agenda item to take. eg 00:20 would be 20 minutes.
The start time is a date/time calculated field which shows the current time after the allocated time has been entered. The formcalc script is :
form1.ActionsHeaderFrame.ActionsStartTime.rawValue
= num2time(Time(), TimeFmt(1))
The Finish Time field is a calculated date/time field to add up the start time and allocated minutes.
The formcalc script is:
var Min1 = ActionsTime.rawValue
var Start1 = Time2Num(ActionsStartTime.formattedValue, "h:MM A")
form1.ActionsHeaderFrame.ActionsEndTime.rawValue = Min1 + Start1
The end time is showing as a number, and I need help in converting to a time.
An example is as follows:
If the text field for allocated time as 00:20 and the start time date field shows 4:23 PM the calculated End time field is showing 22980001.
Any advice or assistance with this script would be most appreciated.Thank you very much for your assistance.
I have changed the allocated time field (ActionsTime) to a binding time field.
In the End Time Field (ActionsEndTime) I have changed the formcalc function as follows:
var Min1 = Time2Num(ActionsTime.formattedValue, "HH:MM")
var Start1 = Time2Num(ActionsStartTime.formattedValue, "h:MM A")
$ = Num2Time((Start1 + Min1), "H:MM A")
The result with user input:
Allocated time field input of 00:10 which is equal to (10 minutes)
Start time field 10:41 AM
End time Field result shows 23:51 PM
Can you please advise where the formula needs to be revised to show the correct end time?
Thank you -
Counting peaks within one minute intervals and outputting with time stamp
I'm currently working on my senior design project for biomedical engineering. We are creating a piezoelectric sensor in order to measure respiration on a bed non-invasively. The sensor lays on bed under subject and records movement due to respiration. We currently have figured out how to detect peaks. However, now we want to count number of peaks detected within a 1 min time period and output that result with a 'timestamp'. We would like the output to be into excel as two columns, rate(number peaks in 1 min) and time. Time in minutes and not actual time is fine. Sampling rate was 500Hz.
My current VI has peak detection criteria and can output total number of peaks and their locations.
Any help would be greatly appreciated as this is our last step before verification and have been stuck on it for awhile.
It won't allow me to attach a tdms file in which our data is stored as, so I can't upload the data currently.
Also attached is our current VI for peak detection labeled 3.26.Resp.PeakDetect.
Thanks for any and all help!!
Attachments:
3.26.Resp.PeakDetect.vi 146 KBI see no need for a case structure. Or did you set up a state machine that I missed?
I recommend making a VI that does nothing but read your 30,000 samples and process it (counting the peaks and what not). From there, you create the array for the number of peaks and the time (in minutes). Then you can call that VI inside of a loop to build up the array of data points.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Have trouble creating formula using FormCalc that will calculate difference in time (hours and minutes) from a Start Date/Time field and End Date/Time field.
I am using to automatically calculate total time in hours and minutes only of an equipment outage based on a user entered start date and time and end date and time.
For example a user enters start date/time of an equipment outage as 14-Oct-12 08:12 AM and then enters an end date/time of the outage of 15-Oct-12 01:48 PM. I need a return that automatically calculates total time in hours and minutes of the equipment outage.
Thanks ChrisHi,
In JavaScript you could do something like;
var DateTimeRegex = /(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d)/;
var d1 = DateTimeRegex.exec(DateTimeField1.rawValue);
if (d1 !== null)
var fromDate = new Date(d1[1], d1[2]-1, d1[3], d1[4], d1[5]);
var d2 = DateTimeRegex.exec(DateTimeField2.rawValue);
if (d2 !== null)
var toDate = new Date(d2[1], d2[2]-1, d2[3], d2[4], d2[5]);
const millisecondsPerMinute = 1000 * 60;
const millisecondsPerHour = millisecondsPerMinute * 60;
const millisecondsPerDay = millisecondsPerHour * 24;
var interval = toDate.getTime() - fromDate.getTime();
var days = Math.floor(interval / millisecondsPerDay );
interval = interval - (days * millisecondsPerDay );
var hours = Math.floor(interval / millisecondsPerHour );
interval = interval - (hours * millisecondsPerHour );
var minutes = Math.floor(interval / millisecondsPerMinute );
console.println(days + " days, " + hours + " hours, " + minutes + " minutes");
This assumes that the values in DateTimeField1 and DateTimeField2 are valid, which means the rawValue will be in a format like 2009-03-15T18:15
Regards
Bruce -
How do I convert time from hours and minutes to decimal time
I am making a spread sheet a work for payroll. I need to make a formula that converts the time from hours and minutes to decimal time. Please help
Hi Taryn,
I can't see much from the photo, but I assume your formula is similar to the one I've used below:
The same formula is used in F4 and F6, and both return the same result (shown in F4).
F4 was left on "automatic" cell format, and the column widened to accomodate the repeating decimal to the point where Numbers would begin displaying zeros.
F6 was formatted as shown in the Cell Inspector to show only two decimal places.
Neither of these is an "exact" decimal, as it is not possible to use a decimal fraction to "exactly" represent 1/6 (or 10/60).
The likely reasons for yours showing a whole number of hours is a difference between your formula and the one shown in the example here, or a difference in the number of decimal places set in the cell's format.
Regards,
Barry
PS: To take a screen shot:
Place the mouse pointer at the top left corner of the area you want to nclude in the shot.
Press shift-command-4.
Use the mouse to drag a selection rectangle contining the part of the screen you want to include.
Release the mouse button. (You'll hear the sound of a camera shutter 'snapping' the picture.)
The screen shot will be saved to your desktop with the name 'screen shot' followed by the date and time.
The image may be posted to the discussion using the same steps you used to post the photo above.
B. -
I have a problem to update iMovie 9.0.9. The OS is running really slow and halts from time to time. In the update procedure it says it's one minute left. That was one hour ago... What can I do?
I have a problem to update iMovie 9.0.9. The OS is running really slow and halts from time to time. In the update procedure it says it's one minute left. That was one hour ago... What can I do?
-
The time when the PI doc is counted ,I want see the hour and minutes ,
HI experts ,
How can I find when the physical inventory doc had been created ,counted and posted , by hour and minutes , the date is not enough .
Thanks in advance .we use MI31 for create Physical inventory doc.
as a matter of fact , what I most want to know is when the count quantity is entered by hour and minutes , because the book quantity in the Physical inventory doc is extract from MBEW table when the count quantity is first entered.After that the book quantity never updated . So it's necessary to konw the exact time when the count quantity is entered , then we can do the right analysis of physical inventory difference.
Maybe you are looking for
-
How can I sync my ipad apps to a new itunes?
I recent had to wipe my computer and reinstall itunes. When I connect my ipad to my laptop is asks if I wants to sync with this new itunes library and that all my data will be lost. Is there anyway to transfer my apps to my existing itunes?
-
PLEASE HELP I,ve spent my day so far with id creation, now how to get a qustion answered, and use this process productively. this is the second time I have had this cancled. OMG please someone find my question and answer it SOMEWHERE where i can find
-
Split & Import WMA file from windows to mac
I have bought several wma files online that are rights managed that I want to play on my ipod. A few days ago, I found a workaround to getting them from the internet to my ipod - download file on the windows side of my mac (I have XP installed and us
-
Airport Express works with every device except base PC
I recently purchased an Airport Express to replace my dead Netgear wireless router. After installing the software on my laptop (which is also new, but worked with the old Netgear router), I was unable to connect to the network. My iPad, our iPhones,
-
Hi, I'm having a xml doc like the following <EmployeeDetails> <employee> <id>1001</id> <name>Ranjith.M</name> <age>26</age> </employee> <employee> <id>1002</id> <name>Unni.D</name> <age>29</age> </employee> <employee> <id>1003</id> <name>Anil.G</name