How to convert float value in hh:mm:ss format

Hi Everyone,
I have a requirement that we have time in hours like 21.52 hrs and we want to convert it into hh:mm:ss format
Please anyone suggest me..
Thanks 

WITH m AS
  SELECT [Minutes] = CAST(21.52 * 60 AS int)
SELECT CAST([Minutes] / 60 AS varchar) + ':' + RIGHT(100 + [Minutes] % 60, 2)
FROM m
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • Function module to convert float value to data type 'dec'

    Hi experts,
      In a report i need to convert float value to the data type 'DEC'. How to convert it. Is there any function module for this conversion.
    Thanks and Regards,
    Vaibhav Tiwari.

    Hi ..
    We can do like this...
    Data : V_float type F value '12345.67'.
    Data: V_dec type P Decimals 2.
    Write:/ V_float exponent 0. "This will display it like Type P
    or
    Write V_float to V_dec EXPONENT 0.
    Write:/ V_dec.
    reward if Helpful.
    <b></b>

  • Can u tell me how to convert int value in to string

    hi to all, can u tell me how to convert int value in to string.

    hi to all, can u tell me how to convert int value in
    to string.Even this way:
    int number = 155;
    String mystring = ""+155;
    [\code]                                                                                                                                                                                                                                                                                               

  • How to convert system Date into DD-MMM-YYYY Format

    hi friends,
    please help me How to convert system Date into DD-MMM-YYYY Format.
    Regards
    Yogesh

    HI..
    data: w_dt(11) type c,
             w_month(2),
             w_mon(3).
    w_month = p_date+4(2). **p_date = given date**
    case w_month.
    when '01'.
    w_mon = 'Jan'.
    when '02'.
    w_mon = 'Feb'.
    when '03'.
    w_mon = 'Mar'.
    when '04'.
    w_mon = 'Apr'.
    when '05'.
    w_mon = 'May'.
    when '06'.
    w_mon = 'Jun'.
    when '07'.
    w_mon = 'Jul'.
    when '08'.
    w_mon = 'Aug'.
    when '09'.
    w_mon = 'Sep'.
    when '10'.
    w_mon = 'Oct'.
    when '11'.
    w_mon = 'Nov'.
    when '12'.
    w_mon = 'Dec'.
    endcase.
    Now...
      concatenate p_date6(2)  '-'  w_mon  '-'   p_date0(4)  into w_dt.
    write w_dt.

  • How to convert a word document into the PDF format?

    Please instruct me step by step on how to convert several Word documents into the PDF format?

    If properly installed and updated (depending on the WORD version), you can simply do any of the following:
    1. Open the doc in WORD and select Print, choose the Adobe PDF printer, print.
    2. Open the doc in WORD and go to the Acrobat menu in WORD and select create PDF (this uses PDF Maker).
    3. Open the doc in Acrobat and the conversion should be done based on PDF Maker.

  • How to convert from value to word ?

    Hi all,
    I intend to convert from value into words such as 234.50 will be two hundred and thirty four and cents fifty. How should I code or any function will able to produce this ?
    Please advise.
    Rgds
    Lim

    Lim
    The SP format modifier spells out part of a date - so does YEAR:
    SQL> select to_char(sysdate,'YEAR') from dual
      2  /
    TO_CHAR(SYSDATE,'YEAR')
    TWO THOUSAND EIGHT
    SQL> To spell out a money amount, you have to take a decimal number and break it into dollars and cents (both integers):
    SQL> r
      1  declare
      2    amount number(10,2) := 12345.67;
      3    dollars integer;
      4    cents integer;
      5  begin
      6    dollars := floor(amount);
      7    cents := (amount - dollars) * 100;
      8    dbms_output.put_line(to_char(to_date(dollars,'J'), 'JSP') ||  ' dollars a
    nd ' ||
      9        to_char(to_date(cents,'J'),'JSP') || ' cents');
    10* end;
    TWELVE THOUSAND THREE HUNDRED FORTY-FIVE dollars and SIXTY-SEVEN cents
    PL/SQL procedure successfully completed.
    SQL>Note that the spelling out is rather american (in UK we wouldn't add the hyphen and we would say twelve thousand three hundred AND forty five).
    Using JSP means we are spelling out a Julian date (ie a number of days, which is allowed to get pretty large. But watch out - there is a limit (somwhere between 1 and 10 million) - ie the number of days between minimum date (4172 BC) and max date (around 31/12/9999).
    HTH
    Regards Nigel

  • IPhone SDK: How to convert Pixel values into Point values

    UIScrollView has a property called contentSize. This takes values in points. How do i convert Pixel values into Point Vales?
    -TRS

    As far as I can tell, they're the same - I know they are in Photoshop at least. My 57x57 point Tab Bar icon is also 57x57 pixels.
    Hope that helps

  • How 2 convert numeric value to character value?

    Hi friends,
    I want to convert numeric value to the character value.
    Is there any FM available?
    Points rewared soon.
    Regards
    Ronn

    REPORT ZSPELL.
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '1234510'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
      CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                AMOUNT    = PAMOUNT
                CURRENCY  = PWAERS
                FILLER    = SPACE
                LANGUAGE  = 'E'
           IMPORTING
                IN_WORDS  = T_SPELL
           EXCEPTIONS
                NOT_FOUND = 1
                TOO_LARGE = 2
                OTHERS    = 3.
    ENDFORM.                               " SPELL_AMOUNT

  • How to convert the alv list data into pdf format

    Hi Expersts,
                      Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
    thanks in advance,
    Regards,
    Samad

    hii samad,
    you can go through these link.i hope it ll solve your purpose
    How to convert list output to PDF
    Display ALV list output in PDF format
    regards,
    Shweta

  • How to convert adobe/acrobat downloads in to word format

    How to convert adobe/acrobat files in to a word format

    Hi UNWLA,
    Adobe Reader XI uses Adobe Export PDF online to convert the file into Word.
    You can go to File > Save As > Word or Excel Online
    You can even use Acrobat XI to convert a pdf to word document.
    Go to File > Save as other... > Microsoft Word > Word document / Word 97-2003 document
    You can even make a selection of any table in the pdf document and right click and select 'export as ' > Word document.
    Or,
        Open a file in Acrobat XI.
        Choose Tools > Content Editing > Export File to Word document.
        Name the Word file and save it in a desired location.
    You might want to refer :
    > http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe- acrobat-xi-convert-pdf-to-microsoft-office-word-tutorial_ue.pdf
    > http://tv.adobe.com/watch/i-didnt-know-acrobat-xi-could-do-that-tutorials/convert-export-p df-file-for-editing-in-microsoft-word-excel-powerpoint-converter/

  • HOW TO CONVERT A XML FILE TO HTML FILE FORMAT IN WINDOWS APPLICATION

    Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
    file. Now i stucked how to write the code for converting to html format.
    Thanks and Regards,
    Dileep.

    Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
    file. Now i stucked how to write the code for converting to html format.
    Thanks and Regards,
    Dileep.
    Hello,
    For converting xml file to html, we could refer to the way shared in the following thread which uses an XSLT stylesheet to transform the XML into another format using the
    XslTransform class.
    http://www.codeproject.com/Articles/12047/How-to-Convert-XML-Files-to-HTML
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to convert .wav to .mp4 with H.264 format using iTunes?

    Hi All,
    Can i convert .WAV to .Mp4 file with H.264 code format using iTunes Windows or Mac OS X? if it is possible, please suggest me how to convert?
    Thanks and Regards,
    Suresh Balakrishnan.

    iTunes application can only convert files to .WAV, .MP3, Apple Lossless Encoder, AIFF, AAC.

  • How to convert U32 value obtained from color control of front panel to float(SGL) for use with IMAQ Draw ?.

    I am trying to get user color inputs from front panel and use it in IMAQ Draw. I need to draw an oval of a certain color in a background of another color. Both these color values are user input. The problem is IMAQ Draw requires SGL color value and the color controls of front panel give U32. I have tried conversion VI's which hasn't worked. HELP !!!

    Jake,
    I think the color control can be wired directly to the input, but I am not positive. I don't know of any color conversions that would help.
    Make sure your image is a color image. You can't draw colors on a grayscale image.
    You might want to consider using overlays, which appear on top of the image but are not part of the image.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How to convert character value to_date?

    I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
    (TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
    TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
    ORA-01830: date format picture ends before converting entire input string
    how to do this?

    Gul wrote:
    I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
    (TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
    TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
    ORA-01830: date format picture ends before converting entire input string
    how to do this?TO_DATE(TO_CHAR(SYSDATE,'DD-MON-YYYY')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'),'DD-MON-YYYY HH:MI:SS AM')

  • How to convert the value in GET RUN TIME statement in minutes value...

    Hello Experts,
    As I understand, the value that is being passed from GET RUN TIME FIELD statement
    is in microseconds. Now, how do I convert it in minutes value?
    Thank you guys and take care!

    This will give in Hours , minutes, seconds.
    data time type sy-uzeit.
    get time field time.
    write time.
    Check it.

Maybe you are looking for

  • Blu-ray disc burned with Encore CS4 stops after each chapter instead of reading continuously

    Hi Blu-ray disc burned with Encore CS4 stops after each chapter instead of reading continuously This happens with an entire series of chapters but does not happen with another series of chapters on thre same DVD. I am missing something to solve this

  • Get Information (level or generation) about a member

    Hi all,I?m developing with VBA in Excel, so i need to get the information about a member, i mean, if i have a member name, i need a function in VBA that returns me the number of generation or level of this member.Thanks to everybody

  • Final Fantasy X/X-2 HD Remaster for Vita - Art Cards

    Sony announced that pre-orders for FFX/X-2 HD for the PS Vita will come with exclusive art cards.  Can we confirm that Best Buy will also be participating in this, and if so can we have the product description updated?

  • How to feed an array?

    can somebody please give me some help on this i have an 2D table that is stored in a database in order to manipulate this, i will have to get JAVA to recognize the table values as an array how do i do that? i mean make that table an array for manipul

  • Photoshop no longer opens on my Computer

    I just closed out of photoshop. When I am trying to get back on, it takes me to creative suite 6 design standard (liscence pop up).  I tried to put my license number in it and it says contact customer service.  The photoshop does not come up. I did b