How to retrive  time in AM/PM format from database?

I am using java & Sql Server.My Project needs to submit a Form which contains various text fields along with From Time & To Time.These two text fields take AM/PM from a drop-down where AM/PM is hard coded. In my DataBase there are two columns FROM_TIME & TO_TIME whose datatypes are "datetime".
Now I want to show the details I have entered along with the time in AM/PM format i.e, if I entered "From> 9:00 AM" & "To> 6:00 PM" ,it should show the same.Please help me.

Use the class SimpleDateFormat to format the dates into AM/PM.
Kaj

Similar Messages

  • How to retrive Original Character in Unicode Format from UTF8

    Our Database is enabled UTF8 format.User entered some data through UI(html forms),which is stored as â?? (whose ascii values are 50082,49792,49817 respectively,as the data is displaying in different way here ,I am giving here with the ascii values)in to the Database.When we retrive the data into UI or into a text file(.txt) it is displaying/storing as ’(Ascii value is 15712189).How to check for is that character correct or not.

    Ashok,
    What is your NLS_LANG setting on the client machine where FORMS is running?
    To see if the value is stored properly in the database you can use the DUMP command. You can find this in the SQL Reference. But here is a desription:
    he syntax of the function call is:
    DUMP( <value> [, <format> [, <offset> [, <length> ] ] ] )
    where:
    value - is the value to be displayed
    format - is a number which describes the format in which bytes of the value are to be displayed: 8 - means octal, 10 - means decimal, 16 - means hexadecimal; other values between 0 and 16 mean decimal; values greater then 16 are a little confusing and mean: print bytes as ASCII characters if they correspond to printable ASCII codes, print them as "^x" if they correspond to ASCII control codes and print them in hexadecimal otherwise; adding 1000 to the format number will add character set information for the character data type values to the return value offset - is the offset of the first byte of the value to display; negative values mean counting from the end length - is the number of bytes to display. So for example,
    SQL> SELECT DUMP(col,1016)FROM table ;
    Typ=1 Len=39 CharacterSet=UTF8: 227,131,143,227,131,170
    returns the value of a column consisting of 3 Japanese characters in UTF8 encoding . For example the 1st char is 227(*255)+131. You will probably need to convert this to UCS2 to verify the codepoint value with the Unicode Standard version 3.0.

  • ICS 2.x: How do I change the hour display format from AM/PM to 24 hour mode in the JavaScript?

    How do I change the hour display format from the AM/PM mode to the 24 hour mode
    in the JavaScript?
    <P>
    To change the hour display format,<BR>
    <P>
    <OL>
    <LI>Open the <I>loadpoint</I>/CalendarServer/cal/uicust/en/main.html
    file.
    <P>
    <LI>Go to the "Misc." section.
    <P>
    <LI>Edit the following line:<BR>
    <P>
    i18n['def clock'] = '24';
    </OL>

    laugh
    how analog. 
    neat idea, but i need to see that part of the screen after login on a fairly regular basis, otherwise i might seriously do this.

  • How can we transfer huge amount of data from database server to xml format

    hi guru
    how can we transfer huge amount of data from database server to xml format.
    regards
    subhasis.

    Create ABAP coding
    At first we create the internal table TYPES and DATA definition, we want to fill with the XML data. I have declared the table "it_airplus" like the structure from XML file definition for a better overview, because it is a long XML Definition (see the XSD file in the sample ZIP container by airplus.com)
    *the declaration
    TYPES: BEGIN OF t_sum_vat_sum,
              a_rate(5),
              net_value(15),
              vat_value(15),
             END OF t_sum_vat_sum.
    TYPES: BEGIN OF t_sum_total_sale,
            a_currency(3),
            net_total(15),
            vat_total(15),
            vat_sum TYPE REF TO t_sum_vat_sum,
           END OF t_sum_total_sale.
    TYPES: BEGIN OF t_sum_total_bill,
            net_total(15),
            vat_total(15),
            vat_sum TYPE t_sum_vat_sum,
            add_ins_val(15),
            total_bill_amount(15),
           END OF t_sum_total_bill.TYPES: BEGIN OF t_ap_summary,
            a_num_inv_det(5),
            total_sale_values TYPE t_sum_total_sale,
            total_bill_values TYPE t_sum_total_bill,
           END OF t_ap_summary.TYPES: BEGIN OF t_ap,
            head    TYPE t_ap_head,
            details TYPE t_ap_details,
            summary TYPE t_ap_summary,
           END OF t_ap.DATA: it_airplus TYPE STANDARD TABLE OF t_ap
    *call the transformation
    CALL TRANSFORMATION ZFI_AIRPLUS
         SOURCE xml l_xml_x1
         RESULT xml_output = it_airplus
         .see the complete report: Read data from XML file via XSLT program
    Create XSLT program
    There are two options to create a XSLT program:
    Tcode: SE80 -> create/choose packet -> right click on it | Create -> Others -> XSL Transformation
    Tcode: XSLT_TOOL
    For a quick overview you can watch at the SXSLTDEMO* programs.
    In this example we already use the three XSLT options explained later.
    As you can see we define a XSL and ASX (ABAP) tags to handle the ABAP and XML variables/tags. After "

  • How do I download videos in different formats from an external hard drive?

    How do I download videos in MPEG and other formats from an external hard drive to  a MacBook?

    If the external hard drive is the source, then "download" is a confusing term. To "download", refers to the action of transfering by internet protocol from the internet to a device.
    To "copy" those files, it is simply a matter of plugging in the external hard drive via the USB cable provided with that drive to a corresponding port on your Air. The drive should automatically mount, and either be visible by an icon on your desktop, or in a Finder window.
    You simply click on the icon, or do similarly within a finder widow to examine the contents of the drive. You would open an additional Finder window and naviagte to your desired flder destination.
    Then, simply "drag and drop" the files you wish to copy from the source (the external hard drive), to the destination fold on your Air.

  • How to send a mail in html format from a send mail workflow node ?

    Dear all,
    Do you know if it is possible to send an e-mail in HTML format (instead of RAW) from a "send mail" node in a workflow ?  ... if "yes", please, let me know.
    (I need to do that because I want to use the "href" tag to insert an hyperlink inside the e-mail)
    - I haven't found any parameter to specify the format of the e-mail.
    - Inside SCOT I tried to change the parameters for the SMTP node... without success.
    - I don't want to use a task calling the FM SO_OBJECT_SEND.
    Nicolas

    Hi Nicolas!
    Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
    If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
    SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
    Hope this helps!
    Regards
    Geir

  • How can I permanently change the date format from the American format to the UK's without having to constantly change it manually every time I start a new spreadsheet?

    This is my first mac so I'm still getting my bearings with it. I've only used Windows programmes before. I can't understand why it's so hard to change the date format of the cells in Numbers to keep it showing the UK format. The system preferences of the mac show that it's in the correct region and has the correct date but this doesn't seem to transfer into the Numbers program. I was very impressed with the mac until I discovered this. If anyone knows how I can get the date to stay in the correct format without having to go through the process of altering it in the cell inspector everytime then I would be very grateful.

    Numbers & most apps, especially those from Apple, use the date format you have set in System Preferences > Language & Text > Region. You can then choose UK from the Region drop-down list. Mine says Custom because I've defined things further as in the second screenshot.

  • How do I use m2ts movie file format from my old pc with FCP on my mac?

    I have recently moved from a PC to a iMac. I have a large number of Sony AVCHD movie files, which were imported to my PC and are in the m2ts file format on my PC. The original files on my Sony camera were deleted so these files are now all I have. Also, for each movie clip on my PC there are 3 files....a very large m2ts file along..... with two very small file....one is a .modd file and the other a .moff file.
    I now want to use these m2ts files (and if needed possibly these other two smaller files) on my Mac make movies with either iMovie or Final Cut Pro. and don't know how to import them or convert them for use on my Mac. Can anyone help?
    One final question. Can FCP author DVD's or is separate software required. Apple has discontinued iDVD for iMovie (which I find rediculous) and so I'm worried they don't support making DVD's with FCP.
    Thanks

    Although I don't use Toast I know lots of people who do and like it for a variety of purposes; for example, many people author in DVDSP and burn disks using Toast. But there are a lot of versions and they have differing features and capability. Do a search in these (or iDVD) forums you'll find plenty of info. Don't know about the other app. Again, if you ask Apple, they may come through with iDVD…they have for others.
    Clipwrap quality limitations? Try the trial and test the results for yourself. As far as I know the trial is fully freatured but there is a one minute clip limitation (which doesn't apply to the paid version).
    Good luck.
    Russ

  • How to send ALV Report in excel format from SAP

    Hi Gurus,
    We are using SAP 4.7 and using different SAP reports.Now I want to send SAP ALV report in excel format directly from SAP in background.Now we send these reports in background weekly by using autimetic scheduling but this is PDF format.Now I want to change this pdf format to excel format.In SCOT T.Code I am able to find any excel format.Please help me out.
    I am waiting for your reply.
    Advance Thanks
    Nirmal

    Hi Nirmal,
    I have done the same in my previous organisation.For this particular solution you need to ask your basis guys to upgrade the support package so that BCS classes could be available in the system.
    API interafces five some problem with attachemnts and SAP has recommended to use BCS classes.
    Currently BCS classes won't be availbale in 4.7.
    Once the BCS classes are available
    use below code
       CONSTANTS:
        lc_tab          TYPE c VALUE cl_bcs_convert=>gc_tab,
        lc_crlf         TYPE c VALUE cl_bcs_convert=>gc_crlf,
       lc_codepage     TYPE abap_encod VALUE '4103',
    data :
       lv_string      TYPE string,
       binary_content TYPE solix_tab,
       size           TYPE so_obj_len,
       *" Set Heading of Excel File
      CONCATENATE 'Employee DATA'
                   lc_crlf lc_crlf
                   INTO lv_string.
       *" Set Header for Excel Fields
      CONCATENATE lv_string
                  lc_header1 lc_tab
                  lc_header2 lc_tab
                  lc_header3 lc_tab
                  lc_header4 lc_tab
                  lc_header5 lc_tab
                  lc_header6 lc_tab
                  lc_header7 lc_tab
                  lc_header8 lc_tab
                  lc_header9 lc_tab
                  lc_header10 lc_crlf
                  INTO lv_string.
    "lc_header1 to 10 could be your field headers
       "Move Internal table data
      LOOP AT gt_final1 INTO gwa_final1.
        CONCATENATE lv_string
                    gwa_final1-field1     lc_tab
                    gwa_final1-field2      lc_tab
                    gwa_final1-field3    lc_crlf
                    INTO lv_string.
      ENDLOOP.
       *" convert the text string into UTF-16LE binary data including
    *" byte-order-mark. Mircosoft Excel prefers these settings
    *" all this is done by new class cl_bcs_convert (see note 1151257)
      TRY.
          cl_bcs_convert=>string_to_solix(
            EXPORTING
              iv_string   = lv_string
              iv_codepage = lc_codepage  "suitable for MS Excel, leave empty
              iv_add_bom  = abap_true     "for other doc types
            IMPORTING
              et_solix  = binary_content
              ev_size   = size ).
        CATCH cx_bcs.
          MESSAGE e445(so).
      ENDTRY.
      TRY.
    *" create persistent send request
          send_request = cl_bcs=>create_persistent( ).
          document = cl_document_bcs=>create_document(
            i_type    = lc_doc
            i_text    = main_text
            i_subject = lc_sub  ).     
          document->add_attachment(
            i_attachment_type    = lc_attach                    "#EC NOTEXT
            i_attachment_subject = lc_sub                       "#EC NOTEXT
            i_attachment_size    = size
            i_att_content_hex    = binary_content ).
       send_request->set_document( document ).
       recipient = cl_cam_address_bcs=>create_internet_address( email ).
       CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient = recipient.
       IF recipient IS NOT INITIAL.
            sent_to_all = send_request->send( i_with_error_screen = abap_true ).
            COMMIT WORK.
    *        MESSAGE text-014 TYPE gc_succ  .
          ENDIF.
        CATCH cx_bcs INTO bcs_exception.
          MESSAGE i865(so) WITH bcs_exception->error_type.
      ENDTRY.
    For BCS decalartion u can go to se 38 and see program BCS_EXAMPLE_1 to BCS_EXAMPLE_7.
    Rewrads if helpful.
    Cheers
    Ramesh Bhatt

  • How to retrive more than one row value from table

    hi,
      I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
      i created one context for each column.
        plz provide me a solution..........
           very urgent..........
            Regards,
            Kiruthika

    Hi,
    Create seperate element for each row and then set values.
    for(int i=0;i<4;i++)
    IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
    wdContext.node<node name>().addElement(element);
    element.set<Att>();
    to retrive:
    int s=wdContext.node<node name>.size();
    for(int j=0;j<s;J++){
    wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
    Check this link about tables
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    Regards,
    Vijayakhanna Raman

  • How do I get books in .pdf format from my computer to ibooks?

    I have some large study guides on my computer that I'd like to add to ibooks to take with me on my iPad. How can I get them there? I can't seem to convince the sync program to find them.

    Ok, how do I get them to show up in my iTunes library to do that? It shows music, movies, tv shows, podcasts, apps and radio at present. I'm not sure how to get garden variety .pdfs  to show up in my library, to be able to drag them.
    the iPad device does show ibooks, along with the books that I downloaded from the ibooks/app store, but these that I want to add came from an educational website. A friend of mine told me he puts work articles and books into ibooks, and I'd like to do it, I'm just having trouble getting them there.  Thanks for your assistance, by the way.

  • How to send delivery status by idoc format from EWM system?

    Hi gurus,
    You know we can send GR(posted) from EWM to R3 system, while in our scenario, we also need to send inbound delivery status( including posting, posted) from EWM to Non-SAP system via PI.
    Can we implement that by idoc? Do we have to use PPF? How to develop in PPF to send message to PI?
    Thanks in advance.

    Hi kishore,
    Thanks for your reply.
    I tried to find how SPPFCADM send idoc in ther relevant method, but you know it's just some object oriented code which is not easy to understand and I couldn't find where send idoc and where can be enhanced.
    I found that /SCWM/ERP_MAPOUT is the implementation name for the method of inbound delivery to ERP system, also there is an action "XI Message:lieferinfo:inbound delivery", can it be used to send idoc to PI/XI system?
    Thanks.

  • How to extract the date and date format from user reponse

    In BOXIR2 WebI, I have one requirement.
    1) My users will change the infoview interface locales as per their geography ( uk, usa, japan, india etc.)
    2) Users will enter/select the date in a date prompt in the locale specified format
    3) Now my requirement is to display the date in "dd-'mon'-yyyy" using the userresponse.
    Please let me know if any one have any workarounds to get the date from any locale and display in the "dd-mon-yyyy" format.

    Hi,
    I think you will have to use the GetLocale() function and base an if off that
    So something like
    To_Date(UserReponse("promptName");if(GetLocale()="en_US";"MM/dd/yyyy";if(GetLocale()="fr_FR";"dd-mm-yyyy";"dd/mm/yyyy")))
    Regards
    Alan

  • How to control Action Definition in mail format from not being executed

    Dear Experts,
    I have created one Action Definition having processing type "SMARTFORM Mail" to which status based start condition is given. The Action is getting executed evnthough the start condition is not satisfied.
    Can any one plz explain me why this is happening and how to proceed further.
    Regards,
    Babu.

    Hi Babu,
    What is the start condition that you gave for the Action?
    Also how are you able to check whether it is getting fulfilled or not?
    Regards,
    Saumya

  • How to download youtube video in Mp4 format from safari ?

    Does anybody knows how to put link and when video plays just click on it and it will download. I had that option a while ago and cant find the way to make it again. Or if you know any other way....

    Using Safari 5.0.1 and Snow Leopard I used part of what I found online and stumbled across the final solution indicated by brackets {}
    From <http://mac-dvd.com/mac-guide/how-to-download-youtube-video-on-mac-for-free.htm l>
    Step 1: Download the videos
    1. Find your favorite YouTube video. This step is pretty self explanatory. Be sure to use Safari and search for your favorite YouTube Video. {Select 720 p or greater.}
    2. Next, you need to go to 'Window' and down to Activity. Click on 'Activity' to bring up the next dialog box.
    3. Once the dialog box has popped up you need to look for the YouTube page among all the page titles and files listed in the window.
    4. Once you locate it and expand all the activities going on in the page, look for the largest file size (this is shown in the right hand side). Most of the files found in a YouTube page are small files while most FLV files are several megabytes.
    Once you locate the largest file,
    What I found out:
    {Hold down the SHIFT OPTION key and double click on it. The video should start downloading in your download and be named videoplayback.mp4.}
    What I found out in the videos I tested is that if you did not use 720p or higher, SHIFT OPTION double clicking or just double clicking on the large file in the activity window downloaded an FLV file, which you then have to convert to mp4.
    Hope this helps.
    Message was edited by: James Mol

Maybe you are looking for

  • Acrobat won't stay open

    When I start acrobat or open a PDF file it opens for a few seconds, closes and the Adobe Software License Agreement opens, I click on Accept, Acrobat opens for a few seconds and the Adobe Software License Agreement opens again...this just happens ove

  • Safari 5.1.5 is not displaying pictures in facebook chat messages.

    No problem in chrome, firefox. Only Solution in Safari is downloading the picture without preview.

  • Photoshop Elements 10 Install Error

    While attempting to install Photoshop Elements 10 I received an error message:  try to run set up again.  After three attempts I keep gettng the same message.  Did I get a lemon of a CD?  What can I do to fix this?  I bought a physical cop of the pro

  • SCCM 2012: Windows update group gives invalid update

    Hi, I have deployed an update group to some pc's (about 60 updates). Now it seems one of the updates got stuck on the client: the client tries to download it to install but it's not on the server. The server shows the update as invalid. Tried to down

  • Error Message  "HTTP error on Adobe DRM Activator request."

    Your Adobe software could not be activated. HTTP error on Adobe DRM Activator request. Adobe DRM Activator error. Client Code:  31 - HTTP Code:  500 Fault location:  20 I had to reinstall Adobe Digital Editions after a hardware failure.  Now I get th