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;

Similar Messages

  • 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.

  • 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.

  • Time format change from 24 hr format to 12 hr format

    Hai all,
    The client wishes to enter the time in the 12 hr format.could you please tell me , what are the necessary settings to be done from convertion of 24 hr format to 12 hr format ?
    How it can be done at user level and T.Code level?
    Please throw some ideas.
    Regards,
    Suresh.

    Hai,
    This is  for the updation of the past data where they have maintained the time format as 12 hr format.Since while uploading, it is very difficult to change into 24 hr time format and i need to change the settings so that system should take the input as 12 hr format. There is no problem whatever the output shows either 12 hr or 24 hr format.
    Please throw some ideas
    Regards,
    Suresh.

  • BestPractices Error - Set Decimal Notation and Date Format

    Hello everyone,
    first of all, I don't know, if this is the right forum for my question, but I hope so
    We're trying to implement the Best Practices Scenarios to a new SAP ERP System.
    We did the steps of the following url, where everything worked fine: http://help.sap.com/bp_dm603/DM_DE/html/index_DE.htm
    Then we integrated Best Practices 603V8 via Solution Builder (TA: /n/SMB/BBI). But now, when we switch to Implementation Assistant and try to activate Scenario DE_109 --> 100(DE) --> Folder USERSETTINGS, we receive the following error in report /SMB99/SU3_O009_B32: Set Decimal Notation and Date Format.
    So we called transaction SU3 and changed Decimal Notation and Date Format, but the error still exists.
    Anybody knows what to do?
    Thanks for your help!
    Best regards
    Patrick
    PS: We executed Testscript /SMB99/SU3_C009_B32 via TA SECATT and there is the error:
    TCD SU3 0,292 sec N Maintain Users Own Data

    Hi,
    Follow below link to verify whatever you have done is correct:
    http://help.sap.com/bp_bblibrary/600/Documentation/B32_BB_ConfigGuide_EN_MX.doc.
    Thanks
    Sunny

  • Time format in activities

    Hello,
    when entering the start and end-time of an activity in the portal, the time is display in 24h-time-format.
    How can I change it to 12h-time-format?
    Under user-settings, I can only adjust the date-format ...
    Thx in advance,
    Gustavo

    If you create that same activity in the GUI and the dates are NOT in 24h format you should check your portal system:
    I suppose you use user-mapping to display CRM pcui views in the portal?
    This means that your CRM user also has a user on the portal system. Maybe check the user profile on that system?
    The only dependency for 12/24h display is on the timezone as far as I know.
    Hope this helps,
    Regards,
    Joost

  • ESS services date and time format?

    Hi,
    How can we change the date and time format displayed on some of the ESS services like addresses, LR screen?  Currently I see US format date MM/DD/YYYY and time is in european format 12,50 instead of dot(.).
    I tried changing the browser setting to UK but it didn't work.  Any other suggestion please?
    Thanks
    Praveen

    I tried to create a simple WD application with just date control UI element, I can see the date format is displayed based on my browser setting.  If I change it to US in my browser locale, it date format changes to US date format, if I change it to UK locale the date format is UK based. 
    Only my ESS/MSS applications are always displayed as US format.  I checked at the iView level and I can only see ForcedRequestLanguage but I cannot see ForcedRequestCountry property so I'm unable to set any country specific details here.  When I look at the JCo connection language tab, I see the
    Current locale: en
    Default VM locale:  en_US
    I think this is where change is required.  However I changed following JCo languages from en to en_UK but still no luck
    SAP_R3_HumanResources
    SAP_R3_HumanResources_MetaData
    Backend is checked as posted above.
    I checked below which is the second precendence in determining locale
    Portal mandatory locale -- open file prtDefault.properties on server under
    /usr/sap/<SID>/JC#/j2ee/cluster/server#/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/system/properties/
    I cannot find below mandatory parameters in the prtDefault.properties file
    request.mandatorylanguage
    request.mandatorycountry
    However, I found this
    request.defaultlanguage=en
    request.defaultcountry=us
    Is this something I can change?  Or should I replace or should I add mandatoryLanguage/country?
    Can this file be edited through NWA or should this file be edited manually at the file system level?
    Please advice.
    Thanks
    Praveen
    Edited by: Praveen11 on Aug 20, 2009 8:38 AM
    Edited by: Praveen11 on Aug 20, 2009 8:41 AM

  • Powershot sx1 is how do change the 24 hr time to 12 hr time

    its that time again to reset the clock...
    thanks

    Hai,
    This is  for the updation of the past data where they have maintained the time format as 12 hr format.Since while uploading, it is very difficult to change into 24 hr time format and i need to change the settings so that system should take the input as 12 hr format. There is no problem whatever the output shows either 12 hr or 24 hr format.
    Please throw some ideas
    Regards,
    Suresh.

  • 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.

  • 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!

  • 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

  • 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

Maybe you are looking for

  • Had to do complete system restore - how can I get my library and apps back?

    I recently had to do a complete system restore on my laptop. How can I get my iTunes library back, including apps? I haven't updated my iPod Touch in a while because I don't want everything on it to be erased. Thanks!

  • [SOLVED] Files in /etc with a dash after them (e.g. /etc/group-)

    Hi, What are the files in /etc with a dash after them? For example, I have: /etc/group /etc/group- /etc/gshadow /etc/gshadow- /etc/shadow /etc/shadow- What are the dashed versions for? Do I need to keep them? Last edited by jwhendy (2010-10-25 21:47:

  • Flash Player for Internet Explorer 5.0

    My company has IE 5.0 and does not allow for other downloads of software. How can I get my Flash 8 movie to run on ie 5.0?

  • How do I cancel my Adobe PDF Pack subscription?

    --Please Cancellation of my Adobe PDF Pack account now! I'm within the 30 day window. --Cancellation of Adobe PDF Pack, Annual (Other,Multiple Languages) --Subscription price:US $89.99/annual with Tax: US$4.24/annual with the Total of US$94.23/annual

  • Problems with create package in Fireworks CS4

    I have two distinct folders that I'm trying to package and I'm not having any luck. Each has been created on one of my computers that is running Windows Vista. I'm trying to use both Windows 7 Beta (not surprised this wouldn't work) and Windows Serve