Convert seconds value to hours & min
Hi all,
I am getting the seconds value at input & I want to convert it to HH:MMS format..How can I proceed?
Please guide me.
Thank you.
Vaibhav Gandhi
B.E. Instrumentation & Control,
INDIA
Solved!
Go to Solution.
You don't say what this 'input' is but if you want to display it on the front panel, all you have to do is this:
Attachments:
Time Display.png 9 KB
Similar Messages
-
Converting seconds to Days,Hours,mins and secs
Hi gurus,
I have a metric in seconds , which is a box uptime . I want to convert that into Days,hours , mins and secs .How can I do that ?
For example , If I have 433500 secs , I should show it as 5days 00:25:00 or in some meaningful format . Can anyone help me out ?
Thanks,Hi,
Refer thinks,
Re: seconds to hh:mm:ss format
OBIEE 11g - Change seconds to DD HH:MM:SS format
Deva -
Convert seconds to Days, hours, Minutes, Seconds in Reporting Services
Hi Guys,
Im currently reporting of an analysis services cube, however I have value which is in seconds and would like to report on this in reporting services as day:HH:MM:SS.
Has anyone got any experience reporting in this format?
Regards
DaveHi Dave,
We can use custom code to convert seconds to HH:MM:SS
Public Function Calculate(ByVal TotalSeconds as Integer) as String
Dim Hours, Minutes, Seconds As Integer
Dim Hour, Minute, Second As String
Hours = floor(TotalSeconds/ 3600)
IF Hours<10
Hour="0" & Hours.ToString
Else
Hour=Hours.ToString
End IF
Seconds = TotalSeconds Mod 3600
Minutes =floor( Seconds / 60)
IF Minutes<10
Minute="0" & Minutes.ToString
Else
Minute=Minutes.ToString
End IF
Seconds = Seconds Mod 60
IF Seconds<10
Second="0" & Seconds.ToString
Else
Second=Seconds.ToString
End IF
Return Hour & ":" & Minute & ":" & Second
End Function
Then we can use the expression to conver it.
=Code.Calculate(Fields!Column.Value)
The report looks like below:
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
Hi All,
I have values in fields KAKO-BEGZT (Start time in seconds (internal)) and KAKO-ENDZT (Finish time in seconds (internal)) which I want to convert into HH:MM:SS format.
Is there any FM existing. Or if anyone can tell me the logic of converting this value into HH:MM:SS format.
Problem is I don't know in which format data is stored in fields KAKO-BEGZT and KAKO-ENDZT.
Regards,
PawanHi pawan,
1. try this code (just copy paste)
2. On selection screen enter number of seconds.
it will give output in HH:MM:SS
REPORT abc.
DATA : mytime(8) TYPE c.
PARAMETERS : begzt LIKE kako-begzt DEFAULT '45000'.
PERFORM gettime USING begzt CHANGING mytime.
WRITE :/ mytime.
FORM gettime USING sec CHANGING tm.
DATA : hh(2) TYPE n.
DATA : mm(2) TYPE n.
DATA : ss(2) TYPE n.
DATA :remsec(10) TYPE n.
hh = sec / 3600.
remsec = sec - ( 3600 * hh ).
mm = remsec / 60 .
remsec = sec - ( 60 * mm ).
ss = remsec.
CONCATENATE hh ':' mm ':' ss INTO tm.
ENDFORM. "gettime
regards,
amit m. -
Converting seconds value to a date
Hi,
I have date column as integer like 1212638737.Could anyone tell me the way of converting this value to corresponding date value?user11365275 wrote:
I have date column as integer like 1212638737.Could anyone tell me the way of converting this value to corresponding date value?How is the number to be converted to a date? Its not a Julain date because the number is way too big -
SQL Query Help/ Converts seconds to day:hr:mi:se
I have query that returns value in seconds. How i will convert those seconds in DAY:HOUR:MIN:SEC in the same query? What will be the mathematical formulae or alogorithim for this?
Thanks
Munis Warsi
nullSeriously, you post 750+ lines of unformatted SQL statement and a completely unreadable and unformatted explain plan and you expect people to be able to help with that?
From what I can see it looks like some sort of query against an Oracle APPS database, and there are numerous calls to PL/SQL functions in there, so you're creating a multitude of context switches between the SQL and PL engines... that's known to cause performance problems.
Take a read of the discussions linked in the FAQ: Re: 3. How to improve the performance of my query? / My query is running slow.
And also consider if your question would be better asked in the Oracle Apps forum space instead. -
Converting seconds to hours + minutes + seconds
hey all,
was just looking for the quickest way to convert seconds to hours + minutes + seconds
eg, 18084 s is 5h, 1m, 24s.You can use the Apache Commons Lang DurationFormatUtils class
import org.apache.commons.lang.time.*;
public class SecondsConversion {
public static void main(String[] args) {
try {
int seconds = 18084;
int milliseconds = seconds * 1000;
String[] values = DurationFormatUtils.formatDuration(milliseconds, "H m s").split(" ");
System.out.println(values[0] + "h " + values[1] + "m " + values[2] + "s ");
} catch (Exception e) {
e.printStackTrace();
} -
I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
I've been unable to locate an app that will do this. The Photos app that comes with the phone or iPad has extremely limited duration controls. PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
iPhoto for iPad is getting some terrible recent reviews. I tried a couple other free apps but they don't use Airplay.
I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV. I've thought the iPad or iPhone would be a lower profile controller.
Am I out of luck?Thanks for your help. Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV. I guess I'm just stuck with using iPhoto on my MB Air. Thanks again.
paul -
Hi
I would like to convert seconds to hours -
I have tried the below two -
select to_char(to_date(176400,'SSSSS'),'HH:MI:SS') from dual;
SELECT NUMTODSINTERVAL (176400, 'minute') FROM DUAL;
RegardsHi,
Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
Always say which version of Oracle you're using.
If you have a number of seconds (s), you can find the equivalent number of hours (h) if you divide s by the number of seconds in an hour, 60 * 60 = 3600.
SELECT s
, s / 3600 AS h
FROM table_x
;H won't necessarily be an integer. If you want an integer, use a rounding function: ROUND, TRUNC, FLOOR or CEIL -
Convert seconds to [h]:mm:ss format on report text box
I want to convert seconds to hh:mm:ss format on the report text box.
I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for the time format for the day.
I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
I can use [h]:mm:ss for Excel that it gives me the total hours more than 24 hours.
I tried to use the following to my text box
Int((sum(MyTime)) / 3600) & Format(Int((sum(MyTime) / 60) Mod 60, "\:00") & Format(sum(MyTime) Mod 60, "\:00"),
but for some reason it only shows seconds part without minute and hour part of the value.
Your help and information is great appreciated,
Regards,
Souris,I want to convert seconds to hh:mm:ss format on the report text box.
I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for the time format for the day.
I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
Hi sourises,
You can use the next function. Place it in a general module.
Function Sec_to_str(seconds)
Dim uur As Integer
Dim min As Integer
Dim sec As Integer
Dim cur_sec As Variant
cur_sec = seconds
If (IsNull(cur_sec)) Then
Sec_to_str = Null
Else
sec = cur_sec Mod 60
cur_sec = cur_sec \ 60
min = cur_sec Mod 60
cur_sec = cur_sec \ 60
uur = cur_sec
If (uur = 0) Then
Sec_to_str = Format(min, "#0") & ":" & Format(sec, "00")
Else
Sec_to_str = Format(uur, "#0") & ":" & Format(min, "00") & ":" & Format(sec, "00")
End If
End If
End Function
Imb. -
Converting seconds to HH:MM:SS
Apologies if this has been answered already, but I'm simply trying to convert seconds to HH:MM:SS. If someone could point me to how Numbers can best handle that I'd appreciate it.
Here's an example: The CSV I receive has a duration column that has the number 3718 in it, representing the total number of seconds. What I wish to see is it broken out to read 01:01:58.
Thanks in advance.Hello
I'm not sure that I understand well your question.
Numbers is right: B2:B4 is not a number, it's a range of cells.
Your formula is trying to use this range of cells as a number representing the minutes: it's meaningless. The number of minutes may be given two ways
B2B3B4
This way the formula would be =TIME(0,B2B3B4,0)
an alternate way (more efficient) is
SUM(B2:B4) (which means sum of the contents of every cell from B2 thru B4
This way the formula would be =TIME(0,SUM(B2:B4),0)
If you looked at the Help you would have read:
TIME
The TIME function converts hours, minutes, and seconds into a time format.
TIME(hours, minutes, seconds)
hours: The number of hours (using a 24-hour clock).
minutes: The number of minutes.
seconds: The number of seconds.
Notes
You can specify hour, minute, and second values greater than 23, 59, and 59, respectively. If the hours, minutes, and seconds add up to more than 24 hours, Numbers subtracts 24 hours repeatedly until the sum is less than 24 hours.
If you don't wish to see the seconds appearing in the cell, apply the format Time > hh:mm
I agree with most users about the need for enhancements about the time treatment, mainly the addition of a "Duration" format not limited to the range 0 thru 23:59:59.
BUT for the questions asked in this thread no enhancements are required.
The available tolls fit perfectly the needs … but of course, users must read the given explanations
I'm always surprised to see guys paying to learn to use a bicycle and many other tools but reluctant to learn how to use softwares they are employing daily.
I never accepted the well known acronym: RTFM (Read The Fu…g Manual).
In fact I never read a manual, but I consult them when I need an info.
I always thought that forums are here to respond to questions whose responce is not in the manuals (and they are sufficiantly numerous).
Of course, it is often more time consuming to explain this advice than reproducing some lines from the manual but I think that no one may seriously use a tool begging the info for every task.
We are assumed to be thinking beeings. Aren't we ?
Of course the given formulas assumes that the time value is fitting the Numbers's requirements (from 0 thru 23:59:59)
Yvan KOENIG (from FRANCE jeudi 3 janvier 2008 13:38:55) -
Converting seconds to a date in another language
Hello all,
I am currently working on an application that uses web services to populate a web-based UI. One of the outputs is a measurement time that is generated using the LabVIEW method 'Get Date/Time in Seconds'. To make since of this, I convert the value to a double precision float and transmit it to the host (on request). On the host side, I am using Javascript to populate a text box with the current measurement date and time. To do this, I use the followign code
var dateobj = new Date(1904,1,1);
/* The variable 'time' should be the seconds since
* midnight 1 Jan 1904 of the current measurement.
var measTime = dateobj.setSeconds(time);
When I do this, what I find is that the time is actually one month off. I can correct this by changing the date in the creation of my 'dateobj' to 1 Dec 1903. Has anyone seen this before, possibly in another language? It is not beyond the realm of reason that I am doing something incorrectly, but I can't seem to get at what right now.
Thanks, Matt
Matt Richardson
Certified LabVIEW Developer
MSR Consulting, LLC
Solved!
Go to Solution.mtat76 wrote:
Hmmmm...that's intriguing.... I need to do some more thorough experimenting to see if I can reproduce this behavior and if there is some point at which it all flips and problem goes away. I am pretty sure that like Teststand, time is referenced to 1970 rather than 1904. I will look into this and try to provide some more details. I was hoping that someone would pop up and say that they had done this before and had no problems; but, I may be a bit optimistic...
Epoch for LabVIEW IS the non-existant second before midnight on Jan 1 1904, Leap secods are un-accounted for to the best of my knowlegde. and since 1904 WAS a leap year the Lotus" phantom 1900 Feb 29 does not pertain at all.
The "one month off issue" bares investigation. I Know Altenbach reported that happened with NI Error Reporting Service logs but, my Google skills fail me and I never did read a "First cause" analisys of the resolution. (The CAR is closed: Read that as "Maybe someone at NI found a viable workaround")
Jeff -
Read a txt file, display a table of values, select a value to set min value for DAQMX
Hello everyone, I am having trouble with the following data importing. I want to do the following:
Open a txt file, have it be imported as a table. Allow the user in the GUI to select a value on the 2nd column, set that value as either min or max for a daqmx analog output. I'll attach the .txt file being used. I can add the code but I was basically using the read from text.vi example with no luck.
Attachments:
090414-200-800-16x.txt 1 KBThank you all, I have set up this input but I have a couple more questions. First now that I have the ability to have a mouse click to set a value, is it possible to have two events, such that the first sets a certain value and the second retains a different one?
In addition (im not sure if this would be ok to post here but for the sake of clarity and decluttering the forum I shall post it here) is it possible to switch from a constant voltage mode (in DAQMX analog output) to a waveform mode ( attacthed the binary waveform) all while maintaining a constant min value (untill updated from the table by user, which is also attached).
I have attachted a vi (Labview version 8.2) that I threw together today.
Thank you all,
DB
Attachments:
calib.csv 3 KB
Example.vi 157 KB -
How to convert decimal numbers to Hours and minutes
Hi,
I am using SSRS 2005. I want to convert decimal numbers to Hours and minutes.
Say suppose, I am adding daily work hours and minutes and the total is 208.63.
Here 208 hrs and 63 minutes. How to convert this to 209 hrs 03 minutes in SSRS.
Any In-built function is there? or how to do using custom code?
Appreciate your help.
Regards,
Balasuppose if field name is TotalDailyHours you can do it as below
=CStr(Cint(Floor(val(Fields!TotalDailyHours.Value)) + ((val(Fields!TotalDailyHours.Value)-Floor(val(Fields!TotalDailyHours.Value)))*100)/60)) + ":" +
Right("00" +Cstr(Cint(((val(Fields!TotalDailyHours.Value)-Floor(val(Fields!TotalDailyHours.Value)))*100) Mod 60)),2)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
days/hours/minutes/seconds.
Does anyone know how to convert a # that equals total seconds to days/hours/minutes/seconds??
Thanks as always
Adami guess you can mod the number with 360 first and get the number of days, then get the remainder and mode by 60 get the hour and so forth, maybe a better way is using recursive function to return you a final result. Hopefully this will help, don't complain on me if I am misleading you since this is my first time try to help.
Maybe you are looking for
-
Photoshop CC 2014 won't open Bridge properly
I have just installed Photoshop CC 2014. Now, when I pick 'Open in Bridge' from the File Menu it just brings up the Creative CC installer. It asks if I want to use the current version of Bridge or upgrade. Selecting the current version does nothing.
-
Getting a Windows Handle from an Applet
how can i do it using jdk1.3? i looked thru the documentation and i didnt see anything. (hopefully i missed something)...thx...sonny
-
File.setLastModified() while file is open? Should it work?
Does a file have to be closed to use setLastModified() to change its modification date? I have a RandomAccessFile that I am writing to, but the modified time doesn't change when it is written to. I would like use setLastModified() to update the time,
-
Classification Data Creation for Material Master Record
Hi all. I've a batch that update material master record with a Bapi "Bapi_material_savedata". After Material creation or changing we also need to insert or to change a classification data in the classification view of the material master record. Is t
-
Blackberry Calendar Entries showing as starting 1HR later than Lotus Notes
Hi Guys, I have a user who has a Blackberry 8300 with Blackberry Version 4.2.2.146. What is happening is, when he schedules or accepts meetings on Lotus Notes, once it has synchronized over to the Blackberry via the BES, it is showing the meeting ent