Can I suppress formatting in getDate()?

I'm getting a "Date" by using the getDate() method. That's fine. What's not fine is that when I display the date on a web page (using c:out) I get a date with dashes in it. So instead of 20070601, I see "2007-06-01". That's problem because you can't go the other way. You have to stip out the dashes in order to create a GregorianCalendar in order to make a java.sql.Date to do an update to the row. I can strip them out at update time, but I'd like to know two things. First, do the dashes only show up when the java.sql.Date is printed, so that if I could look at its raw representation there wouldn't be dashes? Second, is there a way to suppress this "assistance" of putting in dashes when the java.sql.Date is displayed? If it is internally 20070601, I want it to display as "20070601" and never "2007-06-01". Can I do this when I first do a getDate()? Thanks.
Ken

Dates just contain a number, nothing else. It's up to you to decide how to format them on your web page. In your case there's the fmt:formatDate action in JSTL to do that, just read a little bit further in your JSTL documentation.

Similar Messages

  • How can i suppress columns in ALV ?? Will reward points.

    Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
    CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ZIANEXE'
            is_layout        = wa_layout
            is_variant       = wa_variant
            i_save           = 'U'
            IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          CHANGING
            it_outtab        = itab[]
            it_fieldcatalog  = fieldcat.
    Please help.

    in the fieldcatalog you are providing there is a field NO_OUT use this.
    Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
    Edited by: Micky Oestreich on May 8, 2008 12:06 PM

  • How can I suppress an old backup of my iPhone ?

    I have bought a new one and I can't suppress backup of the older...

    I have done a new backup (iCloud) of my new iPhone (5S) and I can't delete the backup of the old one (5). Why ? How could I delete this backup which is usefull now ? iCloud tells me that the backup is still in use...

  • How do you suppress page numbers. I am trying to print a screenplay for the first time since switching to Pages and I can't suppress Page

    How do you suppress page numbers. I am trying to print a screenplay for the first time since switching to Pages and I can't suppress Page #1 without making the rest of the pages inaccurate, as page #1 is the Title Page. Does anyone have any suggestions?

    When you signed to be able to post in the forums, you were urged to read and accept the Terms of Use ruling these forums.
    They claim :
    The contents of the "More Like This" box prove that applying the rules you would have get the wanted explanations without creating this new thread.
    Yvan KOENIG (VALLAURIS, France) mardi 26 avril 2011 10:04:03

  • Can we suppress execution of a query so as to optionally execute queries in data modl

    Can we suppress execution of a query so that we optionally execute queries?0
    I have a combo box in Parameter Form. It has 3 options. I have 3 queries in Data Model.
    I want to execute only one of these 3 queries based on user's selection from combo box.
    I want that other 2 queries do NOT execute at all for that processing cycle. Next time user selects other option and an other query is executed and other 2 are NOT executed and so on.
    Is it possible in Reports 6i in Client/server?
    Pl. guide.
    Tariq

    Include:
    AND :parameter = <this query's value> (e.g. 1 or "SALES" or whatever)
    in each query's where clause. Because this is 2 constants (as far as the SQL interpreter is concerned) it will evaluate it first. If the parameter is set to a value not for this query then it will return no rows with minimal overhead.

  • Java.lang.IllegalStateException:Can't Obtain format

    Hi,
    I am trying to run an image manipulation program on a Tomcat server. When the program deals with PNG images it is fine but everytime it trying to do anything with JPEG2000 images it throws the java.lang.IllegalStateException:Can't Obtain format error. I have placed all the relevent jars in the shared/lib folder of my Tomcat installation and so it shouldn't have any problem finding the format but it is. Can anyone help?

    I wrote the program myself using javax.imageio.* and javax.media.jai.* libraries. It's just a program that converts from TIFF to JPEG2000. It works well when I run it locally but as soon as I deploy it on Tomcat it throws the error.
    <code>
    import java.awt.image.renderable.ParameterBlock;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageWriter;
    import javax.imageio.stream.ImageOutputStream;
    import javax.media.jai.JAI;
    import javax.media.jai.RenderedOp;
    import com.sun.media.imageio.plugins.jpeg2000.J2KImageWriteParam;
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.ImageCodec;
    import com.sun.media.jai.codec.ImageEncoder;
    import com.sun.media.jai.codec.PNGEncodeParam;
    import com.sun.media.jai.codec.SeekableOutputStream;
    import com.sun.media.jai.codec.TIFFDecodeParam;
    public class ImageConverter {
         public ImageConverter(){
         public File TIFFtoJPEG2000(File original){
              File toReturn = new File ("Tmp.jp2");
              toReturn.deleteOnExit();
              try{
                   FileSeekableStream stream = new FileSeekableStream(original);
                   TIFFDecodeParam decodeParam = new TIFFDecodeParam();
                   decodeParam.setDecodePaletteAsShorts(true);
                   ParameterBlock params = new ParameterBlock();
                   params.add(stream);
                   RenderedOp image1 = JAI.create("tiff", params);
                   ImageOutputStream ios = ImageIO.createImageOutputStream(toReturn);
                   J2KImageWriteParam encodeParam = new J2KImageWriteParam();
                   encodeParam.setFilter(J2KImageWriteParam.FILTER_53);
                   Iterator writers = ImageIO.getImageWritersByFormatName("jpeg2000");
                   ImageWriter writer = (ImageWriter)writers.next();
                   writer.setOutput(ios);
                   writer.write(image1);
              } catch (Exception e){
                   e.printStackTrace();
              return toReturn;
         public File TIFFtoPNG(File original){
              File toReturn = new File("Tmp.png");
              toReturn.deleteOnExit();
              try{
                   FileSeekableStream stream = new FileSeekableStream(original);
                   TIFFDecodeParam decodeParam = new TIFFDecodeParam();
                   decodeParam.setDecodePaletteAsShorts(true);
                   ParameterBlock params = new ParameterBlock();
                   params.add(stream);
                   RenderedOp image1 = JAI.create("tiff", params);
                   SeekableOutputStream out = new SeekableOutputStream(new RandomAccessFile(toReturn, "rw"));
                   PNGEncodeParam encodeParam = PNGEncodeParam.getDefaultEncodeParam(image1);
                   ImageEncoder encoder = ImageCodec.createImageEncoder("PNG", out, encodeParam);
                   encoder.encode(image1);
              } catch (Exception e){
                   e.printStackTrace();
              return toReturn;
    </code>

  • How can I export formatted text from a string indicator?

    Does someone know how I can export formatted text (i.e., parts of the text have different formatting, such as color, fontsize, etc.) from a string indicator? Using copy/paste does not work, as it only exports unformatted plain text.

    Hello Sparti,
        Thank you for your suggestions, they are all very useful, and I plan to use the HTML feature under Report Generation to export the formatted text from Labview. However, I am still not sure how I can extract the formatted text from a *string indicator* and transfer it to one of those VIs, so that it can be exported to other applications. Let me give some more specific info on what I am trying to achieve:  I am monitoring the communication between two pieces of equipment. A string indicator shows all the data flow, with different colors for data coming from different instruments. I managed to do that by using a property node and playing with the selection and font color properties. Now, if you just wire the output of the string indicator, the formatting is gone and all you get is just plain black text (for instance, try to programmatically transfer the formatted text from one string indicator to a different string indicator and you will see that the formatting is not preserved). Even if you try the "brute force" method of manually selecting and copying the text in the indicator and pasting it to Word, LV does not export the formatting. But, if you paste *within*  LV (for example, paste it to a string constant in your diagram), then it works. To extract the formatted string from the indicator, I also tried to use a property node, but without success. I am trying to avoid duplicating part of my code to generate the same color-coding scheme on a report. It would be way easier to be able to transfer the formatted text from the string indicator. This is particularly annoying, because the information is there, stored in the data structure associated with the string indicator. But how can I put my hands on it? Any ideas?

  • Can I stop formating mac

    can I stop formating mac because is stop at 50 % form 20 minutes

    Hi
    It shouldn't take that long. Try a reboot and try again or a different hdd

  • Hidden text at bottom of page, how can I fix formatting?

    hidden text at bottom of page, how can I fix formatting?

    You don't give much information so I'm going to guess you're using a text box, perhaps in a layout document. Click on the little empty blue box on the lower right side, then click where you want the text to continue.
    Walt

  • Can we configure Format Mapping in ELM!!!!

    Hi CRM Experts,
    1)Can any one tell me, can we configure format mapping In ELM?
    2)What are Coupan code and Campaign Element ID in Lead whle uploading the file through ELM?
    Thanks in Advance
    Sree

    Hi Sree,
    The format mapping is well defined and all the fields that you require are available for use in the transaction code CRMD_MKTPL_MAP.
    You also have BADI for enhancements CRM_MKTLIST_CUSTOMER
    Campaign element ID is the field for entering the campaign due to which you have been able to track the lead. For example if your company has run a road show and during that you get some visiting cards from people interested in the product then they become lead in your system and the campaign is the reference from which you got them so that road show's id will be maintained in the campaign Id field
    Regards,
    Rekha Dadwal
    <b>You gain a point for every point that you reward. So reward helpful answers generously</b>

  • Can the number format be controlled with custom css styles

    I have a union query where the first query returns a count that I formated as a number '999,999' and the second query returns percentages that I want formatted as '99.9%' I can use conditional formatting to determine which part of the query the result came from but conditional formatting doesn't allow me to control the number format so I was wondering if custom css styles would allow me to control the format. Is converting the number to a character and concatenating a % sign ia better option. I was able to do this using BI Publisher and a different apporach but I want to be able to do it with Answers.

    Make sure the address bar in Contribute is displaying your URL and
    not a file path.
    Your administrator can remedy this by going to the role settings and making sure the Home address is set to the URL.  If you can't get the admin to update the role settings, you can enter your URL into the address bar and then the site should be able to find linked style sheets.

  • Can't place formatted Excel file into ID?

    Can't place formatted Excel 2010 data base into InDesign CS5 on Mac? Won't place into newest version of ID either. Will place if I unmerge cells first, but I need thousands of the cells to be merged.

    I thought you might want to do that. No, once a PDF you can't edit to your heart's content.
    So, as to the matter of thousands of cells? You may have to look that one up but there is a limit on what you can do with an Excel file and InDesign; there are only so many cells, columns and rows that can be imported and let alone worked on inside InDesign.
    And you want to merge the cells in InDesign? What ever for? If thousands of cells then edit in Excel to your heart's content and output a PDF. InDesign is not designed as a spreadsheet and not the tool you need and will really bog down with thousands of cells to merge. Just do it in Excel.

  • Is there an hd video camera which iMovie can read without format conversion

    Is there an hd video camera which imovie can read without format conversion

    iMovie 11 - cameras supported:
    http://help.apple.com/imovie/cameras/en/index.html?lang=en_US
    iMovie 9 - cameras supported:
    http://support.apple.com/kb/HT3290?viewlocale=en_US
    iMovie 8 Camcorders supported:
    http://support.apple.com/kb/HT1014
    Digital camera RAW formats supported by OS X Lion:
    http://support.apple.com/kb/HT4757?viewlocale=en_US
    Digital camera RAW formats supported by OS X Snow Leopard:
    http://support.apple.com/kb/HT3825?viewlocale=en_US
    iMovie tutorials:
    http://www.apple.com/ilife/tutorials/#imovie
    and also this:
    http://www.kenstone.net/fcp_homepage/imovie_09_stone.html

  • Can I suppress the "You are about to update x rows" messages?

    When I execute code like the following, I get a message each time of the type "You are about to xxxxx <x> rows".  And I have to click OK.  Can I suppress that?
    ls_sql = "Update tblClasses set [total_points] = 0 WHERE [Class_Code] = '" & cboClass_Code & "'"
    Also, is there a way to cut from my code and paste it into one of these posts?  I always have to type it fresh, which is error-prone.
    TIA
    LAS

    I'm not having any problem pasting info into a reply here. Shift-Insert or Ctrl-V both work just fine.
    "This is a line of text clipped from notepad"
    And as to your original question, where are you executing this statement, and how? (and which ver of PB/DB are you using)

  • How can I suppress a sub report if a field contains the charcaters N/A

    I have created a report (using Crystal Reports 10) containing several sub reports.  I have used the Selection Expert and checked the Suppress Blank Section check box for all the sub reports.  This will hide the sub report if the fields have null values.  I would like to be able to suppress the sub report if any fields contain the characters N/A.  Is there a formula or a method I can use that will suppress a sub report if the only field value is N/A?

    You can have a summary field for counting if there're any 'N/A'. If there are any, you can then suppress the corr. section. Further in the section in which the subreport is placed, within the main one, you can tick 'Suppress blank section' in the section expert.

Maybe you are looking for