Change time format to decimal

Hello Friends,
I am working on a report where I am showing hours and munites based on difference between date and time.
My o/p is: 1211:23  (hours:minutes) and the type is 'TVRO-FAHZTD'
My requirement is how to change '1211:23' TO '1211.2'.
Please help me.
Thanks,
Shreekant

copy the value in a variable of the following type.
data dec_one type p decimals 1.....do this if you have a decimal and not a ":"
otherwise, another option is to convert it to a string...split it on ':' (colon) and then use the first offset position of the second variable.
example.
data : str type string, str1 type string, str2 type string.
str = '123:23'.
split str at ':' into str1 str2.
clear str.
concatenate str1 '.' str2(1) into str.
Edited by: Priyank Jain on Aug 20, 2008 1:21 AM

Similar Messages

  • Time format to Decimal format

    Hi all
    Does anyone know how to format time format to decimal number?
    Eg: '10:21' in HH24:MI to 10.21
    '21:09' to 21.09
    Thanks in Advance
    Prash

    Since you just want to replace the colon with a period in a string, just use the string replace function:
    select replace('10:21',':','.') from dual;However if you convert this to a number, then as Boneist said it's not really comparable to the time portion of a date as 21 minutes is not 21/100 of an hour but is rather .35 hours (21/60). You won't be able to use this decimalized format as a meaningful number, nor will you be able to do any sort of date based arithmatic on it.
    You may be better off converting your string to date, then into a number via some date math:
    with sample_data as (select to_date('11:21','HH24:MI') dt from dual)
    select dt, (dt - trunc(dt))*24 from sample_data;Edited by: Sentinel on Nov 10, 2008 9:40 AM

  • TA26756 Ho do i change Time format in Logs ?

    Hi,
    I need to change Time format as GMT in Darwin Streaming server logs.
    Kindly suggest me how do i achieve ?
    Warm Regards,
    Jaymin Thakkar.

    Pithan, Leena, Thyagarajan,
    Thanks for your cooperation and KT.
    The problem is resolved.
    STEPS INVOLVED
    Problem: Refurbishment order was created mentioning quantity as 4 and was also released. After entering the value the user came to know that he has to enter quantity as 3. When we went in change mode the field was greyed out and the stock was sitting in "On Order Stock".( Through MMBE). Goods Issue was not carried out, since we found error on hand before. I approached SDN after checking various methods.
    Solution:
    1. Removed the serial no assignment for the material
    2. Carried out technical completion.
    3. Carried out Business completion and saved the document.
    Later on executing MMBE the stock moved from the "On Order Stock" to "Unrestricted Stock".
    Thanks
    Regards
    Sathya

  • Change time format to 24 hours

    Dear Experts,
    In  my webdynpro application I have a requirement where I have to use a 24 hr time format, but by default it is shown as 12 hr format, because of the language in portal.
    And I only want to change the format in this application only, not of all the portal.
    Please suggest.
    Warm Regards,
    Upendra Agrawal

    Hi Upendra,
    Assign the value from backend to the newly created attribute of type new simple type. This will convert it to the 24 hrs format
    OR
    if you get the date from backend,
    Try using a date formatter.
      String s;
      Format formatter;
      Date date = // Your date value from the backend.
      formatter = new SimpleDateFormat("HH.mm.ss");
      s = formatter.format(date);
    This will give the time in 24 hrs in the variable 's'.
    Pls try this and let me know.
    Thanks and Regards,
    Shyam.
    Edited by: Shyam Gopal on Jul 28, 2010 3:05 PM

  • How to use Time Format with decimal to calculate races cars. ss,ddd ?

    In excell there are a user defined format MM:SS.000 very convenient to use in races with decimal precision.
    So in a race car we can have lap times like
    Car 1 - 1:23.234
    Car 2 - 1:23.132
    so the diference can be calculate and the result is 0.102.
    But in NUMBERS therer are no way to use with this precision.
    Somebidy has the same problem?

    Hi hi ni,
    I'm not sure if I understood you, but you can try doing this.
    Create a variable for 0calyear. The user will input the year.
    In the report you use this:
    0calmonth - NumberOfEmployeesKF
    If the user enters 2008, then it will show:
    01.2008 - nnn
    02.2008 - xxx
    03.2008 - zzz
    Hope this helps.
    Regards,
    Diego

  • Converting Time format to Decimal Value

    Dear All,
    How to convert time to decimal value for substraction of time and decimal value
    for eg l_time type tims
           l_dec type p.
    l_diff = l_time - l_dec
    Kindly let me know.
    Thanks in Advacne,
    Ranjan

    Hi,
    Try like this...
    PARAMETERS : tim TYPE tims,
                 y TYPE p.
    DATA : t TYPE string,
           t1 TYPE string,
           t2 TYPE string,
           t3 TYPE string.
    START-OF-SELECTION.
      t = tim(2).
      t  = t * 3600. " hours to second
      t1 = tim+2(2).
      t1 = t1 * 60.  " minutes to second
      t2 = tim+4(2).
      t3 = t + t1 + t2. " total time in second
      t3 = t3 - y.
    Regards
    Debarshi

  • Change decimal format to time format ie 1.5 to 1:30

    Hi I need to create a field such that when you enter a value in decimal format it gets converted to time format.
    Eg change 1.5 to 1.3 ..... Can any one help cheers.... any light on how to do this would be much appreciated.

    create table num_to_time (seq number, val number, dtvl date);
    insert into num_to_time
    select 1 seq, 1.5 val, null dtvl from dual
    union all
    select 2, 2.25, null from dual;
    commit;
    create or replace procedure p_numtotime is
    v_seq num_to_time.seq%type;
    v_val num_to_time.val%type;
    v_date num_to_time.dtvl%type;
    cursor c1 is select * from num_to_time;
    begin
    open c1;
    loop
    fetch c1 into v_seq,v_val,v_date;
    exit when c1%notfound;
    update num_to_time set
    dtvl = to_date(to_char(trunc(sysdate)) ||
    ' 0'||trunc(v_val)||':'||to_char(mod(v_val,trunc(v_val))*60)||':00',
    'dd/mm/yyyy hh24:mi:ss')
    where seq = v_seq;
    end loop;
    commit;
    close c1;
    end;
    exec p_numtotime;
    drop table num_to_time;
    drop procedure p_numtotime;

  • When double to digital indicator set to display in time format... Value changes.

    Dear all,
    I am having trouble displaying the value I want. I have a double value say 320 sent to a digital indicator where I have edited the properites of it to display in a time format containing only minutes and seconds like so, '3:20'. Unfortunately it'll take the value and change it to a another value and display that. I do not know what the issue is. If anyone knows the solution... PLEASE post!
    There is an image attatched! 
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    img.JPG ‏24 KB

    I only believe so due to the fact that when I convert a value from time stamp to double such as 3:20 it gave me 320. So I thought that the reverse might be try. Should I just input the total amount of seconds and that will output the Minuteseconds that I want?
    Thanks for quick reply.

  • How to change date and time format

    Hi experts,
    Can i know how to change the date and time format?
    I want the date format to be dd-mmm-yyyy  and time format to be hh:mm:ss
    These date and time is in my sapscript form.
    I make use of PERFORM function in sapscript.
    This is the code in my print program.
    FORM get_actlog_QA TABLES in_tab STRUCTURE itcsy
                           out_tab STRUCTURE itcsy.
       DATA: object TYPE string, "
            qaname LIKE JCDS-USNAM, "NAME for engineering process, QA Manager
            qadate LIKE JCDS-UDATE, "DATE changed in engineering process, QA Manager
            qatime LIKE JCDS-UTIME. "TIME changed in engineering process, QA Manager
    DATA: lt_jcds type standard table of jcds,
          wa_jcds like line of lt_jcds,
          new_date(10) type c.
      READ TABLE in_tab INDEX 1.
      MOVE in_tab-value TO object.
      select * into CORRESPONDING FIELDS OF TABLE lt_jcds
      from jcds WHERE objnr = object
        AND  ( stat = 'E0005' )
        AND inact = ''.
      Loop at lt_jcds into wa_jcds.
          qaname = wa_jcds-USNAM.
          qadate = wa_jcds-UDATE.
          qatime = wa_jcds-UTIME.
       READ TABLE out_tab INDEX 1.
       MOVE qaname TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 2.
       MOVE qadate TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 3.
       MOVE qatime TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
      endloop.
      clear wa_jcds.
      ENDFORM. 
    This is my PERFORM in sapscript.
    /:           DEFINE &V_QANAME& = ''.
    /:           DEFINE &V_QADATE& = ''.
    /:           DEFINE &V_QATIME& = ''.
    /:           PERFORM GET_ACTLOG_QA IN PROGRAM ZFIR002
    /:           USING &VIQMEL-OBJNR&
    /:           CHANGING &V_QANAME&
    /:           CHANGING &V_QADATE&
    /:           CHANGING &V_QATIME&
    /:           ENDPERFORM.                     
    Sapscript
    Prepared by : &V_QANAME& ,, &V_QADATE& ,, &V_QATIME&
    The output now is
    Prepared by: Name   20080312  115536 
    I want to change the date format to 12-MAR-2008
    and the time format to 11:55:36 
    Can anyone please suggest on how to solve this?
    Thank you.

    Hi,
      Before assigning the  QADATE value you can write the logic to display  20080312   as  12-MAR-2008  taking the offset values .
    Like
    qadate = wa_jcds-UDATE.
    qatime = wa_jcds-UTIME.
      lw_year    = qadate(4).
      lw_month = qadate+4(2).
      lw_date    = qadate+6(2).
    case lw_month.
    when 1.
    when 2.
            concatenate lw_date  '-FEB-'  lw_year into qadate.
    when 3.
          concatenate lw_date '-MAR-' lw_year into qadate.
    endcase.
    READ TABLE out_tab INDEX 2.
    MOVE qadate TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    And you can also change the timeformat also  .
    then assign that value to qatime .Then
    READ TABLE out_tab INDEX 3.
    MOVE qatime TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    I think this helps you.
    Regards,
    Rajitha.

  • How do you change the date and time format in Pages

    I've tried changing the date and time format a number of times for Pages but it does not change.  I'm going to the System Preferences/Language and Text and Formats.  I make the changes click on OK and go back to Pages.  NO change.

    Hi Uncle,
    Page 116 of the Pages'09 User Guide: Control Click the date, Edit Date and Time.
    Date and time can also be in a table. Format the table cell.
    The User Guide is well worth a read. Download it from the Help menu in Pages.
    Regards,
    Ian.

  • Change date/time format in Screen Shot file name?

    I capture Screen Shots all day long.  But when I go to look for the one I just took, it's not always at the bottom of the list.  That's because Mac names them as e.g.
    Screen Shot 2014-04-29 at 1.19.04 PM.png (and the order gets screwed up).
    Can I change to make save as e.g.
    Screen Shot 2014-04-29 at 13.19.04.png (this way they'll always stay in order).
    Thanks for any help.

    You may have to change system time format globally. Is it worth ?
    http://support.apple.com/kb/PH14227
    Best.

  • CONTACT NAMES NOT DISPLAYING & TIME FORMAT CHANGING AFTER SYNC

    i live in kuwait and i was just gifted an officially unlocked 3g iphone from new zealand. i upgraded to 2.1. i have 2 problems
    1. i have synced my contacts from address book. the format that it is stored in is +965XXXXXX. 965 is the country code for kuwait and all numbers in kuwait are of 7 digits. there is no area code as this is a small country. when someone calls me their name does not appear. only the number appears
    2. i have set the time format on the iphone to the 24 hour format but every time i sync with my macbook the time format changes to 12 hour format.

    Follow this procedure to get your contacts back (I assume they are on your Mac/PC):
    1. Go to Settings, then Mail, Contacts, Calendars
    2. Select your account which has the contacts you wish to sync
    3. Turn syncing for Contacts to "Off". This will bring up a box telling you your iPhone is turning off Contacts. My iPhone actually hung at this stage, so after several minutes, I performed a hard restart (holding down Home and power buttons for 5 sec.)
    4. Exit from Settings
    5. Go to Settings, then Mail, Contacts, Calendars
    6. Select your account which has the contacts you wish to sync
    7. Turn syncing for Contacts to "On". This should restore your contacts
    8. Go to Contacts to verify. They initially may not appear or just show up as numbers for a second or two, but then your contacts should appear.

  • Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

    How do you Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

    I performed the following function in order to get my report to view the information the way that I wanted to see it:
    put this formula across from the caption âu20ACu0153Display Stringâu20AC within the âu20ACu0153Format Fieldâu20AC window for description.Â
    whileprintingrecords;
    MonthName(tonumber(Mid({CartonHistory.DateTimeStamp},5,2)),true) & Mid({CartonHistory.DateTimeStamp},7,2) & ", " & Mid({CartonHistory.DateTimeStamp},1,4)Â & " " & Mid({CartonHistory.DateTimeStamp},9,2) & ":" & Mid({CartonHistory.DateTimeStamp},11,2) & "." & Mid({CartonHistory.DateTimeStamp},13,2)
    It converts dates from: 20061212102311xx to: Dec12, 2006 10:23.11.

  • Changing date/time format

    Hi there,
    I live in the United States but prefer my dates to be in the dd/mm/yy format as opposed to the US mm/dd/yy format. I also like 24-hour time rather than AM/PM. I System Preferences>Language & Text>Region, I found the tool to modify my preferred date/time formats. However, I notice that the format of the date in my menu bar does not change (it still reads Sep 25 when it should read 26 Sep). All other dates/times appear to function correctly. I briefly switched the Region of the computer to the United Kingdom but quickly switched it back because of how autocorrect handled words like "color."
    Ideas?

    That did the trick - sometimes the easiest thing to do is hard to see. Seems I have been working too long on a Windows machine (unfortunately, I have to do so at work)...
    Thanks for the quick help!

  • Wmic to change dat time format

    Hi,
    can i change the format to normal date time when query the CreationDate in this line "wmic process where name="ProcessName" get name,CreationDate" i need the script to be in single line and not to run in batch
    THX

    No - all you have to do is add th this bit:
    @echo %xt:~5,2%-%xt:~7,2%-%xt:~1,4%
    Just keep breaking down the string.
    @echo %xt:~5,2%-%xt:~7,2%-%xt:~1,4%
    %xt:~9,2%:%xt:~11,2%
    YOu can extract and place any or all parts.   I just got too lazy to keep counting characters.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Acrobat 9.3.4 issue: Creating single PDF from Multiple PDFs

    Hey all, My setup: • Mac OS 10.6.4 / Mac Pro dual / 6GB RAM • Adobe CS5 Master Collection • Acrobat Pro 9.3.4 Just ran into issue (critical) I have not encountered before, but it is frighteningly reminiscent of the InDesign CS5 problem of the "Docume

  • Splitting file names using delimiter question

    I have a very simple question. I am trying to set the variable $fnameYear to whatever is after the third '-'. My problem is that if there is a space in the name it wont work correctly. How can i use a delimeter so that it splits after the '-' for onl

  • Hi, How do i transfer information from my powerbook g4 to macbook

    Hi, I have a powerbook g4 and want to transfer info to my new macbook pro. Ive already set up the macbook and now what is the next step for migration?

  • ALV table Functionalities

    Hi All,         I am using ALV table in my application(Standard table) ..         I want to customize this table.         I want to edit the existing functionalities and also want add few more buttons in the table.       what is the code to do this..

  • Booted off Verizon Fios Internet when use VOIP phone.

    When I use my VOIP phone while on the internet (I use Verison FIOS Internet), I get booted off the internet.  I have done what tech support said to do which was to do a hard reboot of the router but after a short while it does it again.  They had no