Right format on a date, need help

I get a dateparameter from my jsp. This is in format "dd.MM.yyyy". When I parse it to a date the result is e.g:
Sun Feb 10 00:00:00 GMT+01:00 2002.
How can I get this to be in the preferred format (dd.MM.yyyy)?
My code is:
SimpleDateFormat formatter = new SimpleDateFormat ("dd.MM.yyyy");
ParsePosition pos = new ParsePosition(0);
Date fromdate = formatter.parse(request.getParameter("fromdate"),pos);

I don't check it in a special way.
This is all the needed code (in a JSP page):
SimpleDateFormat formatter = new SimpleDateFormat ("dd.MM.yyyy");
DecimalFormat df = new DecimalFormat("###,##0.00");
DecimalFormat dfNoDigits = new DecimalFormat("###,##0.##");
// get parameters
String customerId = request.getParameter("customerId");
Date fromdate = formatter.parse(request.getParameter("fromdate"));
Date todate = formatter.parse(request.getParameter("todate"));
<td>
<%=from%> <input type=text name="fromdate" value="<%=fromdate%>" style='font-family: Verdana; font-size: 10px' size=12>  
<%=to%> <input type=text name="todate" value="<%=todate%>" style='font-family: Verdana; font-size: 10px' size=12>  
<input type="hidden" name="customerId" value="<%= customerId%>">
<input type="submit" style="font-family: Verdana; font-size: 10px" value="Vis">     
</td>
As you can see I create a new Date object and gives it the parsed value from request.getParameter(). This is funny enough always in the long format. This value is inserted in textboxes in the JSP.

Similar Messages

  • Sign in told my firefox is out of date, need help to sign in my email funstarling at hushmail

    I sign in told my firefox is out of date. I did try the upgrade but could not do
    need help to get my sign in working
    my sign in is funstarling, and xxxxxxxxx

    Hi funstarling,
    Please remember this is public and showing passwords in a post can alow others to use the credentials.
    It is possible to manage passwords from the Options or Preferences menu under advanced tab. If you click show password it will show the password if in the past it was chosen to be remembered.
    Please also try the account recovery for a new password.
    Also what version of Firefox is saying it is out of date?
    Looking forward to your reply!

  • Display Years between dates - Need Help.!!!

    Dear Reader,
    I need help to resolve this.
    Below are the values stored in table:
    SOME_ID      START_DATE     END_DATE
    1                     15-NOV-2001        04-MAY-2002
    1                     05-MAY-2004        04-MAY-2007
    1                     05-MAY-2007        27-JAN-2008
    2                     07-NOV-1991        02-FEB-1994
    2                     07-NOV-1998        02-FEB-1999
    For example, the query should return as follows :
    For SOME_ID 1:
    SOME_ID        YEARS
    1                      2001
    1                      2002
    1                      2004
    1                      2005
    1                      2006
    1                      2007
    1                      2008
    Kindly help in providing the solution.
    Thanks in Advance.

    with sample_table as (
                          select 1 some_id,to_date('15-NOV-2001','dd-mon-yyyy') start_date,to_date('04-MAY-2002','dd-mon-yyyy') end_date from dual union all
                          select  1,to_date('05-MAY-2004','dd-mon-yyyy'),to_date('04-MAY-2007','dd-mon-yyyy') from dual union all
                          select 1,to_date('05-MAY-2007','dd-mon-yyyy'),to_date('27-JAN-2008','dd-mon-yyyy') from dual union all
                          select 2,to_date('07-NOV-1991','dd-mon-yyyy'),to_date('02-FEB-1994','dd-mon-yyyy') from dual union all
                          select 2,to_date('07-NOV-1998','dd-mon-yyyy'),to_date('02-FEB-1999','dd-mon-yyyy') from dual
    select  distinct some_id,
                     column_value years
      from  sample_table,
            table(
                  cast(
                       multiset(
                                select  to_number(to_char(start_date,'yyyy')) + level - 1
                                  from  dual
                                  connect by to_number(to_char(start_date,'yyyy')) + level - 1 <= to_number(to_char(end_date,'yyyy'))
                       as sys.OdciNumberList
      where some_id = 1
      order by years
       SOME_ID      YEARS
             1       2001
             1       2002
             1       2004
             1       2005
             1       2006
             1       2007
             1       2008
    7 rows selected.
    SQL> SY.

  • Date format - need this format --  04/04/2002 - need help?

    Hi, I am trying to get the date into this format 04/04/2002, so I can insert into the database...
    I have this code.. but it display it like this - Apr 4, 2002
    Date t = new Date();
    String today = DateFormat.getDateInstance().format(t)
    Thx
    Rich

    Or because today is the 4th day of the 4th month maybe :
    java.util.Date t = new java.util.Date();
    java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("MM/dd/yyyy");
    System.out.println(df.format(t));

  • Building a report from SCOM DATA- NEED HELP!!!!!!!!!!!

    Hello
    Can someone help me with trying to obtain data on a specific rule? I need data on availability of a system and time down included. I use a bit of sql and powershell but I am having trouble finding counters and the actual
    compilation of the report. I use Report Builder , SSMS  and Operations Manager
    Sinxcerely
    Elise 

    Hi,
    Please review the report below.
    Reporting > Microsoft Generic Report Library > Availability
    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.

  • Putting together mixed format into iMovie HD6, need help

    I started a movie in the 4:3 ratio (is aspect the right word?) a while ago, and now am adding some interviews done by someone else, which were sent to me over the internet.  Nice pictures,about 11 short interviews, but 3 of them are done sideways.  Cameraman must've turned the camera sideways to take the movie.  Is there a way to fix this?
    Also, some material I am trying to add to the movie, is done in 16:9 ratio, and I am getting the black bars across the top and bottom, and some are boxed in.  How can I make the all the same with out the letterbox thing.?  From here on, I will use 16:9, but there is too much in this movie to start over. I am not a professional, anything but, however, I make cute movies. :-)
    The movies clips I downloaded are full size when I open the files, but have the black bars when inserted into the movie.
    I am using a refurbished MacBook Pro , 10.7.5, with iMovie 6.  Thanks for any help.  Marjorie.
    P.S. another problem -  the audio cracks up in certain places, and yet when I play it over, it may play fine.  I will be putting this into DVD format to burn to a disk.. Do you thing the audio will copy OK? Is there a way to correct this.
    AlsoI am getting error messages from Apple, sometimes,  when I save my work. and it shuts down automatically, but does not seem to bother the content???.

    Set your iPhoto preferences (Advanced/Importing) to download your photos (videos) into iPhoto. When you plug in your 3g, your video will down load into iPhoto. Then drag it from iPhoto to your desktop. From there you can drag it into iMovie.

  • I cant format my laptop! Need help

    I cant format my laptop with recovery system.it says Partition removed. What is that mean? is there any solution to format my computer back to factory image?

    Hi There,
    Machine has recovery partition which is removed or corrupted. In such situation you need to order the recovery media from hp. Steps available below, using these discs you can re-image the machine to factory shipped setup.
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c00810334
    hope it helps.
    I work for HP.
    **Click the KUDOS star on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Regards,
    WW
    “I am an HP Employee“
    ***** Click the KUDOS star on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem***

  • How to find no. of days,subtract date -- need help 04/21/2008 - 11/05/2007

    ADAT is internally YYYYMMDD format in table.
    Should i move this field before computation ? IF SO WHAT IS THE FORMAT ,statement pls;
    G_days = ITAB10-ADAT - ITAB11-ADAT.
    04/21/2008 - 11/05/2007 ouput is 54.   ---THIS OUTPUT IS WRONG.
    Any better way of doing this.
    second value 11/05/2007 - 09/10/2007 ouput is 86
    SORT ITAB9 BY ADAT DESCENDING.
    APPEND LINES OF ITAB9 FROM 1 TO 7 TO ITAB10.
    DELETE ITAB9 INDEX 1.
    APPEND LINES OF ITAB9 FROM 1 TO 7 TO ITAB11.
    For eg. : if  02/30/2008 - 02/10/2008 -
    ouput should be 20 days..
    Edited by: Sona on Feb 21, 2008 1:36 AM
    Edited by: Sona on Feb 21, 2008 5:45 AM

    Hi,
    Check the following code:
    REPORT ZDATEDIFF.
    DATA: EDAYS   LIKE VTBBEWE-ATAGE,
          EMONTHS LIKE VTBBEWE-ATAGE,
          EYEARS  LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
                TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      exporting
        i_date_from          = FROMDATE
        i_date_to            = TODATE
      I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = EDAYS
        E_MONTHS             = EMONTHS
        E_YEARS              = EYEARS.
    WRITE:/ 'Difference in Days   ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years  ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.
    Regards,
    Bhaskar

  • Can't get form to send data, need help...

    Heya,
    So if you visit
    http://www.typhoonsaloon.net
    and fill out the form, if you were the reciever of that info, you'd
    find that the two drop down menus don't appear in the email that is
    sent via email.php. I'm not quite sure what to do, can anyone help?
    All the files can be accessed as follows:
    http://www.hookmedia.biz/typhoon_saloon/intro.fla
    " " intro.swf
    " " email.php

    If its brand new it should have come with Lion already installed. Up the top menu click on the Apple symbol on the left and see what system it is running, eg. 10.6.8.  10.7.3. etc.
    Pete

  • I backed up 10.4 but cannot migrate data, need help

    Hi, New here. I had a 1 on 1 training and was recommended to back up my computer (Tiger OS) which I did. I installed Leopard, but cannot migrate data back. I backed up on a USB IOmega drive. The person I spoke with at the apple store either did not know or did not remember to tell me to turn off the File Vault. Now I cannot bring back much of the data or settings I had.
    Here's my question, If I reinstall Tiger, will I be able to transfer the data back from the back-up drive, and then just do an upgrade instead of a complete fresh install of Leopard?
    Thanks,
    Mike

    You should be able to mount your file vault directory- the sparse image- within Leopard from your backup, and then copy the data to your new user directory.
    You should be able to copy the data from your backup drive if you re-install Tiger, but since its not clear why you can't copy the data from the drive now, its not clear whether the issue preventing you from getting at it will go away after you reinstall Tiger.
    I think maybe you might want to restate your problem in more detail.

  • Startup Error - Worried About Recovering Data - Need Help!

    Hi All...
    This is my first time posting to the forum, and I'm hoping someone can help me.
    Last night, I used my MacBook Pro (specifics are pasted below) with no issues at the airport. I then boarded my flight, stowed my laptop under my seat, and landed. Total duration was about 2 hours. I got to my car, and wanted to make some notes and, when I turned on my computer, I got these screens. One is a pink and white pixelated screen, and the other is some sort of candy-striped screen with the same pink and white colors.
    I've NEVER seen anything like this before, and it's got me worried. I'm most concerned with recovering all of my files at the moment.
    The computer seems to be working normally in terms of no strange sounds, or clicks, or anything like that indicating that anything has been dislodged internally, or anything like that.
    I have all the startup and installation discs if they'll help restore anything.
    Can anyone help me? Please?
    Thank you for any advice you can offer.
    -matt

    Quick update: went to the Apple store last night and, magically, the computer turned on like nothing was wrong. I'm guessing the ghost of Steve Jobs was in that store last night.
    I'm not convinced - based on my gut, and the Apple experts - that the problem is solved. I can get the computer to boot up to diagnostics and all that, but I think it might be time for a new one. I've actually attached some screengrabs of the error report if you'd be so kind to take a look.
    That said, my funding is kind of limited at this point. And, while I'd love to throw down $1,500 for a newer model, I just can't. I'm in the $500-700 range, honestly. So, I'm wondering what you'd recommend. I purchased my current model on eBay several years ago and, as I said, it worked beautifully up until now.
    Does the year of the machine necessarily dictate how well it will function? Like, because of the two year difference - rather than the OS, or installed features - is a 2008 MAC definitely going to function less well than a 2010 MAC? I've never been sure of how that works.
    So, if you'd be interested in entertaining one last request, I guess it would be your recommendation as to what type of system I should search for. Is there a wave of MACs from the past that, in your expert opinion, seemed to perform particularly well?
    Again, I'm very grateful for all of your help. Thank you!
    Screengrabs:

  • The right mac for me.  NEED HELP

    I am looking to buy a mac. I will just be using it for email, writing with WORD. In the near future i would like to add ADOBE photoshop and illustrator.
    * 2.0GHz Intel Core 2 Duo
    * 1GB memory
    * 80GB hard drive1
    * Combo drive
    is this good enough??

    Don't forget to check on the student discount and the iPod promotion. The best thing is you can upgrade your RAM and Hard Drive yourself later.
    Here is the info if you ever need it.
    DIY INFORMATION
    DIY Warranty Info
    DIY hard drive replacement instructions
    DIY MacBook: How to install memory
    Mort

  • Plan to Travel With an iPhone, I will NOT Use Data, Need HELP

    So in a week I leave for a month long trip to Germany and Holland. I have an iPhone 4, and I only plan on bringing it to use it as a camera. I'm staying at a family members house so wifi is easy to come by. How should I set my phone so that I will not be pushed any data or will not recieve any sort of change in my bill. 
    From my understanding if i put it on airplane mode AND also turn off cellular data in the general>network>cellular data settings that I should be fine and even if someone trys to text or call it will not go through. I just want a confirmation so that nothing makes me want to cry when I come home.

    forrestp wrote:
    So in a week I leave for a month long trip to Germany and Holland. I have an iPhone 4, and I only plan on bringing it to use it as a camera. I'm staying at a family members house so wifi is easy to come by. How should I set my phone so that I will not be pushed any data or will not recieve any sort of change in my bill. 
    From my understanding if i put it on airplane mode AND also turn off cellular data in the general>network>cellular data settings that I should be fine and even if someone trys to text or call it will not go through. I just want a confirmation so that nothing makes me want to cry when I come home.
    leave the phone home, buy a camera

  • Updated to Mavericks now my Toshiba External HDD 3.0 won't mount need help what to do

    I recently updated to mavericks now my toshiba external hard drive wont connect and i have some important data need help to get drivers im assuming its the drivers but need help to locate the drivers

    haha, so now i'm thinking. I'm learning the terminal as fast as i can but there are several lines of codes and commands in there that throws up red flags to me that i don't fully understand. It just looks fishy too me. It would be highly appreciated if someone could just check this out just to tell me that i don't need to worry about it. Or point me in the right direction. I just feel un easy about this. ha.

  • Get the format of current date - urgent

    Hi,
    In my apllication, I want to get format of current Date.Please help me regarding to this.
    thanks,
    Hiranmayi

    use SimpleDateFormat class
    SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy");
    String strFormatDate = sdf.format(new Date());this will give you the sting representation of current date

Maybe you are looking for

  • How to set up my elderly parent with Mac so that I can use remote access to help her?

    I want to set my elderly mother up with a new Mac mini so that I can use remote access to show her how use email, browse the internet, share photos.  (She lives in KY, I live in OR) She has had an iPhone and an iPad for about 6 months and she can bar

  • Photoshop CC on Sony's Vaoi Fit15A (pen pressure problems)

    This question is very specific. I just downloaded the trial version of Photoshop CC on a new Vaoi Fit15A. It's like a hybrid between a tablet so I can supposedly draw on the screen directly. (So I don't have a pen tablet.) My problem is it doesn't re

  • Help with complex Acrobat forms

    Hi Everyone, Background: I worked with another developer and completed a form for one of our clients but I need to know if the below change requests are even possible and if so if anyone would like to help with finishing the form. I am definitely wil

  • UI: Toolbar - (F?)AQ about toolbar button activation and usage

    <b>Q:</b> How can I add functionality of the two SAP toolbar buttons shown on the screenshot? <b>Reply:</b> Please note that the clicks on the toolbar buttons are translated into MenuEvents! I.e. if the button is active at the time you want to use it

  • Select count(*) gives different value

    Hi Experts, I have a table with more tnan 50 thousand records with 8 indexes. When i am trying below query select * from customer_table           WHERE line_id IS NULL           AND balance >= 0           AND dept_code = '233'           AND overline