How can I convert Bigint value which produced with Timespan?

Below from MS SQL, tResultTime's datatype is Bigint
Below from my C# project's UI and I need to get a result like "Elapsed Time".  How can I get that?

CREATE TABLE Timing (
StartTime DATETIME
,EndTime DATETIME
,ResultTime BIGINT
,ElapsedTime VARCHAR(20)
insert into Timing (StartTIme, endtime) values
('2014-11-20 14:35:42','2014-11-28 14:36:15')
DECLARE @MyNullTime TIME
SET @MyNullTime = '00:00:00'
SELECT StartTime,EndTime
,DATEDIFF(MILLISECOND, starttime, EndTime) AS 'tResultTime (MS)'
,cast(DATEDIFF(HOUR, starttime, EndTime) / 24 AS VARCHAR(5)) + 'day(s) '
+ cast(DATEADD(SECOND, - DATEDIFF(SECOND, EndTime, StartTime), @MyNullTime) AS VARCHAR(8)) AS 'Elapsed Time'
FROM timing
-Vaibhav Chaudhari

Similar Messages

  • How can i convert  my invoice which is in smart forms to xml file

    how can i convert  my invoice which is in smart forms to xml file.

    Hi Anil,
    Please go through this link:
    1. XSF stands for XML for Smart Forms. It is important to contrast XSF with .... The eDocx script engine can provide a script to convert the file format to an 
    http://www.ossincorp.com/Black_Box/Black_Box_4.htm
    please rewrds if found helpful.
    Regards,
    Alok

  • How can I convert Float numbers which are represented as 'E-05' to full precision

    I have over 6,000 records which all have 'E-05' in the field.
    It should actually be full precision, such as:  0.000046793055472781
    How can I convert all of these?  There are around 600,000 records in the whole table, so I only want to convert the 'E-05' records.  For some reason these are incorrect, but all the others are totally fine.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    If they are float values, they have the full precision you can get with a float value.
    Keep in mind that what you see in management studio is a textual representation of the value. It is not the value itself. A float value is stored as 53 bits of mantissa and an 11-bit exponent which is a power of 2.
    To view the value without the exponent, you can cast to decimal, although this will give you a slightly different value. You can also use the str function:
    DECLARE @f float
    SELECT @f = 0.000046793055472781
    SELECT str(@f, 20, 18)
    However, formatting of the value is best done in the presentation layer. You should not change the data you have in the table. But if the source is actually exact decimal values, maybe you should use a decimal data type instead.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How can I convert .mov files for use with other apps?

    When loading movies taken on a friend's digital camera to my PC, the video files were saved as Quicktime .mov files. I am now unable to pull those files into any other software program (I want to put them onto a CD or DVD and play on external players.) How can I convert .mov files to a .wmv or .avi or mpeg?
    Thanks - J
    RS720G   Windows XP  

    Kodak Digital Camera QuickTime MOV Problems
    After battling a number of serious problems with the videos taken by my new Kodak Digital Camera, I decided to write up this page so that anyone searching the web would find out the true answers without as much grief!
    I’ve also made some other comments about my experience with the camera, in case anyone was considering buying a Kodak camera in the near future.
    I bought the camera just before Christmas 2004 in the US. At the time of writing, it is a pretty good model for domestic use—about 5.2 megapixels, costing about US$400 (or AU$600 back here in Australia). From a company as reputable as Kodak, I expected no problems.
    The first disappointing thing was that the spring inside the spring-loaded battery clip, inside the camera, came loose within days. It proved impossible to reattach it without completely dismantling the camera, which (despite my engineering qualifications) I was not willing to do. This would usually have been a warranty item, but Kodak’s warranty does not extend to other countries. I’ve since had to jam cardboard in to keep the battery clip engaged, and have taped the battery bay shut to avoid it opening accidentally when taking the camera out of the case. This works fine with the docking station (an extra AU$100!), but it means I can no longer charge the battery without the docking station (since you need to take it out to charge it). I was not impressed!
    The camera takes good photos, and I have no complaint with that. The controls and camera menus are well-designed. The large display is excellent.
    The EasyShare software is not as easy to use as it looks, has a habit of crashing, has a web update program that is always running in the background of Windows, and transferring images is nowhere as easy or quick as it should be. I’ve now uninstalled it completely, and simply copy the photos directly from the device. (If the camera memory is nearly full, and you just want to transfer the last few photos, then it’s impossible to use the EasyShare software to browse the camera’s photos without it actually downloading the whole lot through the USB cable—and it takes forever! Copying from the device directly doesn’t hit this bug.)
    The capability to take video using the camera was a great attraction when I selected it, and, if it worked properly, it would make it quite a handy little camcorder in its own right. With a 512 MB memory card in it, over an hour of video can be recorded at Video-CD quality (320 x 240 24fps video, 8 kHz audio). It’s not full digital video, but it would still be a pretty good feature for a US$400 camera. If it worked.
    The first disappointing thing about taking videos is that the optical zoom cannot be adjusted while the camera is recording. It can only be adjusted between video sequences. I don’t know why this restriction was made in the design.
    The real problems, however, start when you try to do anything with the video clips captured by the camera. Kodak has chosen to capture the videos in QuickTime format. This is fine—QuickTime is, technically, excellent—except that there is no simple way to convert QuickTime MOV files to AVI or MPEG or VCD. The Kodak software comes with a QuickTime player, so you can see the video clips on the computer you installed the software on—and they look good. Problem is that you can’t just dump those MOV files onto your Video-CD creator (it will usually want AVI or MPEG files).
    It takes some time to realise that Kodak have not even bothered to include any software with the camera that can convert these MOV files to a more useful format. This is a serious PR blunder, and anyone bitten by this is unlikely to go near the Kodak brand ever again.
    After some web searching, owners of these cameras generally find that the best (only?) freeware solution to convert MOV to AVI is Bink and Smacker’s RADtools program.
    RADtools is amazingly powerful for the price (i.e. free), but it hits two fundamental problems with Kodak Digital Camera MOV video files, that are the fault of the Kodak camera, not RADtools. (I know this because every other MOV converter hits the same problems—except one, as you will see below.)
    The first problem is that the sound cannot be converted properly. When you convert any Kodak MOV files, there is an “aliasing” of the sound at the upper frequencies. This is a technical description—you get a whispery, tinny, C3PO type of echo to everything. It really destroys the quality of the video clips (especially bad when I am trying to capture priceless memories of my 4- and 7-year-old sons—I don’t want their voices destroyed for all time).
    Every conversion program I tried ended up with the same audio problem. I concluded that it is something strange in the way the Kodak cameras store the MOV files.
    Strangely enough, I noticed that the QuickTime player didn’t distort the audio like this. The audio sounds just fine through QuickTime. More on this shortly.
    The second, more serious problem is that RADtools could not properly convert some of the video clips at all. (This problem only affected less than 10% of the clips I originally filmed, but most of those clips were very short—less than 20 seconds. It seems that the probability of this problem gets worse, the longer the clip.) RADtools would misreport the number of frames in the clip, and would stretch out a small number of frames of video (in slow motion) to match the length of the audio.
    Again, I confirmed that this is a property of some of the MOV files stored by the camera. Other conversion tools also had problems with the same MOV clips.
    After more angst, I found a number of websites in which frustrated owners of these Kodak cameras have reported the exact same problems.
    It was only then that I discovered that QuickTime itself can convert MOV files to AVI. Believe it or not, it’s built into the QuickTime Player that Kodak supplies, or that you can download free from apple.com. The problem is that you can’t use it unless you pay Apple to upgrade to QuickTime Pro.
    After realising that this would probably be the only way to get decent audio for these clips, I paid the AU$59 to Apple Australia to get the licence key that enables the extra “Pro” menu options in QuickTime.
    Sure enough, you can “Export” any MOV file to a number of formats, including AVI. And guess what? The audio comes out fine!
    So, the first piece of advice I can give is: pay Apple the US$29 (or whatever amount it is in your country) to upgrade QuickTime to QuickTime Pro.
    From here, however, there are still a few snags to untangle.
    The first is that the default settings for Exporting to AVI don’t give a great result. It defaults to the Cinepak codec, medium quality. This looks terrible compared to the original QuickTime movie. Even on maximum quality, that codec just doesn’t give good results.
    I finally found that the best option is to use the Intel Indeo Video 4.4 codec, set on maximum quality. This creates AVI files that are 10 to 20 times larger than the original MOV files, but the quality is there. If (like me) you only want the AVI files so you can dump them into your Video-CD program, then you want to keep the quality as high as possible in this first step. The extra hard disk space is not really a concern. When your VCD program converts the AVI files to MPEG, it will compress them to the usual VCD size.
    Now for the biggest snag: those problem MOV files are still a problem, even for QuickTime Pro. Unbelievably, these Kodak cameras are spitting out MOV files which have some sort of technical flaw in their data specifications. QuickTime is able to play them back fine—and that seems to be all that the Kodak engineers really checked. However, if QuickTime Pro tries to export them, then when the progress bar gets to the end, it never finishes. It just keeps going. If you check the output folder with Explorer, and keep hitting F5 to update the file listing, you can see the file getting bigger, and bigger, and bigger. It never stops.
    That this happens even for QuickTime itself (the native format for these files) confirms that the problem is with the software built into these Kodak cameras. It would be nice it they issued a patch or a fix. I couldn’t find one.
    Fortunately, there is a “workaround” for this problem. I found it when trolling the net trying to find solutions to all these problems. The workaround is to use QuickTime Pro’s cut and paste facility. Open the problem MOV file, then press Ctrl-A (the standard key combination for “select all”—in this case it selects the entire film clip, as you can see by the grey selection of frames at the bottom of the player). Then hit Ctrl-C (i.e. copy, which in this case copies all the frames, but not the incorrect data structure in the original MOV file). Now hit Ctrl-N (i.e. new, in this case a new MOV file or player). In this new player, press Ctrl-V (i.e. paste). Now you have a new version of the MOV file with the bad data structure exorcised. You can save this under a new name, but make sure you specify “Make movie self-contained”—otherwise, it will simply be a link to the original (bad) MOV file, which you are probably going to delete once you save the exorcised version. (You also cannot overwrite the original file, because it needs to access that to make the “self-contained” movie. You need to give it a slightly different name, save it “self-contained”, then delete the original and rename the new copy back to what you wanted it to be. A pain, I agree, but at least the **** thing works—finally!)
    The exorcised MOV file can now be used to Export to AVI format. (I also keep all the MOV files on a separate CD, in case I want to reconvert them to a different format in the future. I figure it’s better keeping the exorcised ones than the haunted ones.)
    So I hope that all this answers a few of your questions. No, you weren’t being incredibly stupid.

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • How can I convert iWeb page to html with NO javascript for email campaign?

    I have a holiday greeting I made in iWeb '09 for my business. The service I'm using to use to manage my mailing list wants me to strip all javascript code from the page so it is not seen as spam when it is emailed.
    How can I convert the page made in iWeb to an html page with no javascript?
    Thanks

    How can I convert the page made in iWeb to an html page with no javascript?
    You cannot. There will be nothing left. iWeb pages rely a lot on JavaScript.
    Use a template from Mail.app. Or create such template. These are simple TABLES and have no JavaScript in it.
    Do Cmd-Shift-G in the finder and type :
    /Library/Application Support/Apple/Mail/Stationery/Apple/Contents/Resources/
    Open one of the folders and open each successive folder until you see files like Picnic.mailstationery.
    Right-click to show the package content.
    Then navigate thru Contents, Resources until you see the files and images you need.
    Edit them to your hearts content.
    Double-click the file Picnic.mailstationery and it will open in Mail.app for further processing.

  • How can i convert BigDecimal value in BigInteger

    Hi Folk!
    I am problem i need to change BigDecimal value in BigInteger. Can anybody tell me how can i do it?
    I Know how to change a BigInteger value in BigDecimal. Here is the code.
    BigInteger bint = BigInteger.valueOf(1231231232);
    BigDecimal input2 = new BigDecimal(input);but I have a BigDecimal how can i do the opposite what i have done in code?
    Thanks in Advance

    I am problem... that's not good.
    (Glad to see you got your problem resolved.)

  • HOW can I convert int value char TO String

    I am trying to study Java by books, but sometimes it is quite difficult to find answers even to simple questions...
    I am writing a program that analyzes a Chinese text in Unicode. What I get from the text is CHAR int value (in decimals), and now I need to find them in another text file (with RegEx). But I can't find a way how to convert an INT value of a char into a String.
    Could you help me?
    Thank you in advance.

    You are confusing matters a bit. A char is a char is a char, no matter
    how you represent it. Have a look at this:char a= 'A';
    char b= 65;Both a and b have the same value. The representation of that value
    can be 'A' or 65 or even (char)('B'-1), because the decimal representation
    of 'B' is 66. Note the funny construct (char)(...). This construct casts
    the value ... back to the char type. Java performs all non-fraction
    arithmetic using four byte integers. The cast transforms it back to
    a two byte char type.
    Strings are just concatenations of zero or more chars. the charAt(i)
    method returns you the i-th char in a string. Have a look:String s= "AB";
    char a= 'A';
    char b= (char)(a+1);
    if (a == s.charAt(0)) System.out.println("yep");
    if (b == s.charAt(1)) System.out.println("yep");This piece of code prints "yep" two times. If you want to compare two
    Strings instead, you have to do this:String s= "AB";
    char a= 'A';
    char b= 'B';
    String t= ""+a+b;
    if (s.equals(t)) System.out.println("yep");Note the 'equals' method instead of the '==' operator. Also note that
    string t was constructed using those two chars. The above was a
    shorthand of something like this:StringBuffer sb= new StringBuffer("");
    sb.append(a);
    sb.append(b);
    String t= sb.toString();This is all handled by the compiler, for now, you can simply use the '+'
    operator if you want to append a char to a string. Note that it is not
    very efficient, but it'll do for now.
    Does this get your started?
    kind regards,
    Jos

  • Nikon D5500 generates RAW files as .NEF which Lightroom 5 won't read. How can I convert these on a Mac with Yosemite?

    I have tried the Adobe DNG converter (v8.7.1.311) but when I choose the folder where the photos are, it shows an error reading "The source folder does not contain any supported camera raw files". I cannot find any other software for Mac which claims to be able to do this. Can anyone help?

    Many thanks for that. I've never shot RAW before and am new to DSLRs generally so don't know the relative difference between formats. If I have to convert RAW  to TIFF to be able to use Lightroom, will it have been worth me shooting in RAW at all, or will I do just as well staying with the highest quality of JPEG I can get from the camera? My camera is 24.2M megapixels

  • How can i clear the values which i would have entered once for a form, which is stored for that particular site when i open it always?

    it is the values we enter into a form and when we try to fill the form again we get those values. i want to delete those

    I am sure you can adapt one of the two solutions shown here.
    LabVIEW Champion . Do more with less code and in less time .

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • I recored a video with my ipad, downloaded it to my mac but I cant upload it to Youtube because the format IMG is not a video format. How can I convert it?

    How can I convert a video I took with my ipad on the format IMG to a supported format for Youtube?

    To upload videos to YouTube we have to make sure videos are in a format that YouTube accepts. Here’s the list of some well-known video formats which YouTube supports:
    WebM files (Vp8 video codec and Vorbis Audio codec)
    MPEG4, 3GPP and MOV files – (typically supporting h264 and mpeg4 video codecs and AAC audio codec)
    AVI (Many cameras output this format – typically the video codec is MJPEG and audio is PCM)
    MPEGPS (Typically supporting MPEG2 video codec and MP2 audio)
    WMV)
    FLV (Adobe – FLV1 video codec, MP3 audio)
    But I think you get the wrong video file. iPad recorded video files are in m4v, mp4, mov, avi format but not the img files. Anyway, if you need a video converter, Format factory or iFunia video converter are good choice.
    Good luck!

  • Can I filter by value which is not displayed in grid columns?

    In excel it is possible to filter by value of measure which is not displayed in the report.
    How can I possibly do this in Performance Point Grid? (in filter by value there I only see the measures in columns).
    Please advise
    Namnami

    I found it is possible to filter by value by changing the MDX in the query tab.
    (I filtered by certain existing value in design, then switched to Query and changed to the measure which is not displayed). I shows up correctly.
    The problem is, once I change the query, I get an error when tring to connect a filter on a grid column:
    "consumer parameter no-longer exists in the consumer webpart"
    The grid looks "frozen"- cannot drill up / down etc.
    How can I filter by value which is not displayed without loosing the ability to attach a filter to the grid?
    Namnami

  • Hi, how can i break the value for a row and column once i have converted the image to the array?????​??

    Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
    At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've  tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
    Please help me!
    For your information, I'm using LABView 7.0.

    Hi,
    Thanks for your reply.Sorry for the confusion.
    I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
    Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
    I hope that I have made the problem clear. Sorry if it is still confusing.
    Hope you can help me. Thank you!!!!
    Attachments:
    arrayrowncolumn2.JPG ‏64 KB

  • How can I convert a .pdf file to an Indesign CC file which is editable?

    How can I convert a .pdf file to an Indesign CC file which is editable?

    Hi btacme,
    I understand there are some third-party utilities that will allow you to convert a PDF to an InDesign file. But, as PDF is intended to be a final format, Adobe doesn't offer this capability. Are you unable to make the edits that you need by opening the PDF in Acrobat?
    Best,
    Sara

Maybe you are looking for