Wrong date shown

i have this code :
public static void main(String[] args) {
Date today = new Date();
SimpleDateFormat formatter;
String myDate;
formatter = new SimpleDateFormat("ddmmyyyy", Locale.US);
myDate = formatter.format(today);
System.out.print(myDate);
I was hoping it would give me 17102006 as that is the current date when I ran the code. But I got 17232006 from the stdout.
I'd check my computer date and timezone setting, all fine.
Is there something wrong with the code ?
Note : I got the wrong result ( but with different value ) when I ran the code under Windows. I'm currently using Debian GNU/Linux with jdk 1.5 update 01.
Thanks

It's:formatter = new SimpleDateFormat("ddMMyyyy", Locale.US);(look at the MM (month) instead of mm (minutes)).
Next time please paste your code between [code] [/code] tags with the help of the code button just above the message box.
It makes the code readable.
Regards

Similar Messages

  • Wrong dates shown in iPad app store updates list

    The dates listed for the app updates in my iPad's app store are wrong! They used to show the date of each app's most recent update, but now they show each app's ORIGINAL availability date. My iPod, on the other hand, doesn't have this problem. What's the deal? When looking at the updates list, the "updated" date is much more useful than the app's original date. Any idea what's wrong and how to fix it?

    I talked to Tech support they told me to go into my time and date settings change to manual setting and set the date and time forward to a random time (several months ahead worked for me)  updates will clear then go back to automatic time.  It is bizzare but it has worked for me.  I certainly do not want or need to see all my updates I hope Apple will change this silly feature.

  • Last payment date shown in credit master sheet is wrong.

    Hi,
    The last payment date and amount in the credit master sheet S_ALR_87012218 does not reflect the true last payment info. As per the payment history list, there have been more recent last payments after the last payment date shown on the credit master sheet, however i dont know why the actual last payment info is not being shown on the credit master sheet.
    Can someone help?

    Hi
    When running credit master sheet make sure you are looking into correct credit control area where the payment has been entered. I am sure to update credit master sheet you do not need to run any program, this report updates figure online (at the same time). If you want to make sure its working take any customer having outstanding invoice on account. Make entry using transaction F-28, go back to credit mast sheet correct credti contrl area and you will be able to see updated amount.
    I don`t know what t.code you are using to do incoming payment entery? Balance will not be updated properly in the reports if you are using wrong posting keys. Posting Key should be 15 inorder to update correct balance on customer report.
    Hope this will help

  • Bridge CS6 occasionally displaying wrong 'Date Created' for .NEF's

    I noticed this problem only recently, and this the third time it happens (that I know of).
    Sometimes my Bridge puts a wrong Date Created (not Date File Created or Date File Modified) on a NEF RAW file, whilst the next one (taken perhaps just a few seconds or a minute later) has the proper date. Strangely the Date File Created & Modified do show the proper creation date.
    Example to clarify:
    Metadata viewed on my D90 itself
    Photo 1 taken on: 30/09/2013, 9:03:26 PM (DD-MM-YYYY)
    Photo 2: 30/09/2013, 9:07:52 PM
    Photo 3: 30/09/2013, 9:08:12 PM
    Photo 4: 30/09/2013, 9:08:34 PM
    Photo 5: 30/09/2013, 9:08:54 PM
    Photo 6: 30/09/2013, 9:09:34 PM
    viewing in bridge:
    Photo 1: Date Created: 30/09/2013, 9:03:26 PM
                   Date File Created: 30/09/2013, 9:03:26 PM
                   Date File Modified: 30/09/2013, 9:03:26 PM
    Photo 2: Date Created: 30/09/2013, 9:07:52 PM
                   Date File Created: 30/09/2013, 9:07:52 PM
                   Date File Modified: 30/09/2013, 9:07:52 PM
    Photo 3: Date Created: 23/09/2013, 7:42:02 PM
                   Date File Created: 30/09/2013, 9:08:12 PM
                   Date File Modified: 30/09/2013, 9:08:12 PM
    Photo 4: Date Created: 30/09/2013, 9:08:34 PM
                   Date File Created: 30/09/2013, 9:08:34 PM
                   Date File Modified: 30/09/2013, 9:08:34 PM
    Photo 5: Date Created: 04/09/2013, 10:14:45 AM
                   Date File Created: 30/09/2013, 9:08:54 PM
                   Date File Modified: 30/09/2013, 9:08:54 PM
    Photo 6: Date Created: 04/09/2013, 10:15:06 AM
                   Date File Created: 30/09/2013, 9:09:34 PM
                   Date File Modified: 30/09/2013, 9:09:34 PM
    As you can see, it's not a 'stable' deviation.
    I could live with it, apart from one problem: the batch rename function only has 'Date Created' as option for renaming with date.
    It's also quite annoying for my photography study, since my teachers might get confused by the wrong date in the Metadata when I turn my photo in.
    I tried compacting the cache whilst my camera's SD card wasn't connected (so the files aren't 'available' anymore), no difference.
    Another thing I tried was to hook my SD card up on a different computer, same result.
    So it might be my SD card, but that doesn't explain why the correct date is shown on my D90 itself, though.
    If anybody here has an idea how to fix / avoid this problem, help is much appreciated.
    Greetings,
    Alex

    I have never inserted the 8GB card in the D3000 before just a minute ago.
    And I just took 7 rapid photo's of my previous post (~1s interval)
    All 7 displayed actual date in my camera, the first 4 displayed a wrong date in bridge (24/09/2013, times; 2:12:16PM, 2:12:20PM, 3:09:24PM and 3:10:26PM). Last 3 displayed proper time in bridge.
    So yea, I'm pretty sure something is wrong. I'll try formatting the SD card (as suggested before) but however you look at it, this doesn't add up.
    edit:
    Well I figured out one thing: if I view the photo's directly on my SD card through bridge, it shows the same date for Date Created, Date File Created and Date File Modified.
    Quite logical, to be honest, since I am viewing the date the file was created on the camera.
    However, if I export photo's with Adobe Photo Downloader (or whatever it's called again), it displays the date those copies were created (by Date File Created). Date File Modified is still ~the same as Date Created since it hasn't been modified since the original creation.
    edit2:
    The formatting seems to have solved the issue, for now anyway. Still have no clue why the SD card got such (occasional) cases of drunkness.

  • Why is CS4 putting wrong dates on files?

    Moved my CS4 from XP computer to new Windows7 computer. All seemed fine for a week.
    Now when I create or change a file, it does not put correct date on file (e.g., instead of 5/30/11 it will put 3/26/10 or on 6/2 it will show a date of 5/3/11 on the file). Wrong date shows in Explorer too but when I right click the file, the correct date is shown in properties. I can open the file in Adobe if I type in the filename.
    System date, clock, etc. are all fine.  No other program (Access, Word, Flash) does this
    Don't know if there's a connection but I did move over my preference/preset files from the XP just before this happens. I'd appreciate any help....thanks

    Aha!  Your Explorer view is displaying the Date Taken, which is of course the date the image was originally captured (and which is stored in the EXIF data within the file).
    That it is different from the Modification Date normally seen in Details view is because Explorer tries to show you a view of your files that can differ depending on the types of files it senses you have in the folder.  A real head-scratcher if you don't expect it.
    You can alter this behavior, on a folder by folder basis, by right-clicking the folder, choosing Properties, clicking the Customize tab, then choosing General Items.
    What many don't know is that you can set the behavior Windows-wide to ALWAYS show General Items views for all new folders (i.e., circumventing the derivation of what Customization to make by looking at the files) by this process, excerpted from my Windows 7 tuning guide.  Note that it involves adding an item to the registry with regedit - BE VERY CAREFUL WITH THIS:
    Configure Explorer
    Do not set Folder Types but use "General Items" for all by adding the following string value to the registry:
    [HKEY_CURRENT_USER\Software\Classes\Local Settings\
    Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
    FolderType                           REG_SZ                NotSpecified
    -Noel

  • Wrong data export from ID to PS

    Hallo,
    I have a strange problem pasting placed eps images in ID back to PS.
    If I mark (correct name, path and image look) placed eps images in ID CS4 and paste them into a new file at PS wrong images show up! They exist in the same document but are other than marked. But in the created PDF file everything is OK.
    On the other hand, if I open the same created PDF file with IL and mark the same images and past them to PS the correct images are shown????  What can be the reason?
    Thanks for any comment.
    Regards Edzard

    By "mark" do you mean select?
    Presuming you do, you should not attempt to copy/paste the image from ID to Photoshop. Instead select "edit original" from the context menu or the links panel. That will open the selected image. You may need to use "edit with...) instead if the wrong editing application opens using edit original.
    I really don't know why the wrong data would be opening in Photoshop. Is the correct image highlighted inthe links panel? If so, is this happening in all documents, or just a particualr file? You might want to try the links listed in the "Troubleshooting 101" box at the top of the discussions page, up a level from here.
    It may also have to do with .eps which is an archaic format for working in ID and is known to cause problems from time to time. Saving as .psd or .tif instead should fix that sort of issue.

  • ST03N shows wrong data

    Dear all,
         we have rediculous data shown on ST03N reporting -- "Infocubes: All data".  One of our query shows OLAP time=DB time=Frontend time=1544.0.   Could anybody tell what might be wrong with the technical content?  Our support packages are as following:
    We are currently at :
    supportlevel 0004 (BI_CONT 703 0004 SAPKIBIIP4 Business Intelligence Content);
    SAP_ABA 700 0011 SAPKA70011 Cross-Application Component;
    SAP_BASIS 700 0011 SAPKB70011 SAP Basis Component;
    PI_BASIS 2005_1_700 0011 ;
    SAPKIPYJ7B PI_BASIS 2005_1_700;
    SAP_BW 700 0012 SAPKW70012 SAP NetWeaver BI 7.0;
    thanks in advance,
    wx.

    Have you also installed BI admin cockpit and the technical content before checking with ST03,since from BI 7 ,you need to have this activated.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0279c7a-da1c-2a10-7eba-dfcc252d5b34
    https://forums.sdn.sap.com/click.jspa?searchID=9769540&messageID=4880760
    Hope it Helps
    Chetan
    @CP..

  • Access Table displays the wrong data

    I have successfully used Migration Workbench to migrate my tables and data into an oracle 10g database.
    I chose Modify Access Database from the MWB options in order to continue to use Access as the Frontend.
    At this point the forms do not work.
    What I noticed is that the oracle link tables _R have the wrong data in them when opened via Access.  But if I query the oracle db the data is correct.  I added a primary key but this did not help. Any suggestions ?
    Also I had to re load the code modules that run the application they disappeared during the migration process. Is that normal?
    Thanks for your help

    The table had the wrong columns and the wrong data, basically it was mapped to the wrong table.
    I checked the properties from the table detail window, much more helpful than right clicking on the object and choosing properties which only show you the DSN connection. The detailed description as shown below shows the table is incorrect
    ODBC;DSN=marilyn2;DBQ=ORCL ;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F;BAM=IfAllSuccessful;MTS=F;MDI=F;CSR=F;FWC=F;PFC=10;TLO=0;;TABLE=BODYSHOP_EXTRACT.CONTRACTS_INFORMATION_TABLE.
    Can I just delete the linked table and import the correct table using Link Manager? Or do I need to use OMWB & Modify Access through the tool?
    Last question for today thanks

  • Downloads with Safari show wrong date

    Hi, this is my first post and I'm stumped.
    When I download a file (i.e. PDF) via Safari on either my Imac or Macbook (4.03 and 4.02) both running Leopard 10.5.7 it shows up in my downloads folder with the wrong date: wrong year, month, and day.
    When I download the same file with Firefox the download date is correct.
    Does anyone have any suggestions to remedy this annoying problem? Thanks.

    Ok. I just downloaded a PDF via Safari that shows the creation date as: 23/12/08 1:10 AM.
    Same file downloaded via Firefox shows date correctly: today at 9:16 PM.
    The date from Safari has been all over the map... 03, 07, 00 etc. all different.
    Message was edited by: i-Mack

  • Wrong Dates in Sent Folder

    After doing a clean install of 10.5 and importing all of my mail messages from my .mac account, I noticed that many of the messages in my sent folder had the wrong date. Apparently they were marked with the date on which I first synchronized my 10.5 Mail with my .mac account. I've since tried to rebuild that folder, and when I do that, those problematic messages show up as sent "Today" at the time I rebuilt, even though many of them are nearly a year old. Any suggestions as to what might be causing this? I've read several threads regarding problems with the sent folder, but none with this specific date problem.
    Thanks.
    One more thing...
    All sent message show up with the correct date when I access the sent folder online through .mac.
    Message was edited by: James Casey1

    I tried several experiments and noticed that if you move the messages in "sent messages" with wrong dates to another folder (for example to the "inbox") then they get back to their correct date.
    Apparently rebuilding mail boxes at this point doesn't fix anything, as if you move the messages into "sent messages" again then the date gets wrong again.
    Funny enough, when the message is back into "sent messages" and appears there with the wrong date, if you make a text search FROM THE INBOX on all folders in the search results these messages will appear as located in "sent messages" with THE RIGHT DATE!!! Doing the same search when you are in "sent messages" will show the message with the wrong date!!!
    So I am now sure there is BIG BUG in Mail about this.
    So unless Apple fix this, I guess the only way is to put all the messages from your "sent messages" with wrong dates in a folder where they appear with the correct date, save or export your "sent messages" folder messages, delete entirely your "sent messages" folder, and reload all you "sent messages" again.
    However I have no safe procedure for this and it won't prevent the bug to reoccur later on...

  • IPhoto imports photos with wrong dates even if the dates are fine on the camera

    Hi!
    When I import photos with iPhoto, sometimes it imports them with wrong dates, even the dates are fine on the camera. It puts dates such as 2032. Does anyone know how can I fix that. As far as I know there is no way to change dates of the photos.
    Thanks!

    well that is very confusing since if the date is correct on the camera it will be correct in iPhoto
    and as to
    As far as I know there is no way to change dates of the photos.
    Try looking through your iPhto menus - two commands - adjust time and date and batch change time and date - asjust is used to correct incorrect dates like a comera setting -   Batch change for missing dates like with scans
    LN

  • Report returns wrong data when run on server

    Hi,
    I'm runing CRS XI R2 on Windows Server 2003 SP2.  When I refresh a report in the Crystal Reports XI Designer, I'm getting correct data.  But when I schedule the report to run on the server it returns wrong data.  The data is different from what I see when I refresh it from the designer.  In the report I have running totals set up to count customers that meet a certain criteria.  The report is very large.  It take almost 2 hours to refresh.
    I was wondering what is causing the difference in running total data between refreshing it on the designer and running it on the server.  Is it returning wrong data b/c of it not reading all the records?  Should I be making any changes to the server settings?  I saw that under pageserver, there are options for  setting the 'Minutes Before an Idle Report Job is Closed' and 'Database Records To Read When Previewing Or Refreshing a Report".  Do either of those have anything to do with the report returning incorrect data when being scheduled to run on the server?
    Thanks,
    Kim

    Hi Xuandao,
    You would need to Use Cell Binding and Trigger concept to accomplish this.
    Its simple, however, you would have to work on a trial and error basis to understand this concept as implementing the same is subject to your dashboard and WEBI Design.
    Open you LiveOffice.
    Insert your WEBI, Now, go to Object Properties of your WEBI, select the second tab that says Prompt, Here, it lists the prompts that you have for your WEBI. This would also enlist your BEx variables as well. Select this BEx variable and click on the button that says Prompt at the bottom of this window. Here, select choose Excel Data Range and click on the cell select button on the right (small button that lets you choose what cell you want to bind this prompt to), Now select a free cell that would not be even populated later on when you run the dashboard say A1 (remember the value that you select). Click on OK and again OK. The WEBI Refreshes and you can see all the prompt values at the cell A1. These are all the possible values stored for your BEx prompt variables (these values are fetched from BW system dynamically).
    Now, save this LiveOffice, Go to you dashboard. Connect your dashboard to your Live office. Go to Data-> connections-> Now, select the WEBI and in the right hand pane  go to Usage tab, here, Click on Trigger cell button on the right hand side and select A1 in you LiveOffice.
    It should work fine.
    Let me know.
    Rgds,
    Sreekul Nair

  • How can I get my @mac email to work? when I try to reset password, i cannot access email for this and the security tells me I have wrong date of birth

    Have used bilmac@mac email address for years last couple of weeks am getting message icloud needs password which it then rejects, when I try to reset password,they want email to verify i cannot access email and the security question is D. O B. it tells me I have wrong date of birth. so I am stumped, any ideas bilmac

    COME ON PEOPLE. (WHY ARE THE LETTERS SO BIG HERE?) I AM VERY OLD AND JUST LIKE THINGS TO STAY THE SAME. I DID NOT, DO NOT, WANT ICLOUD TO DO ANYTHING I HAVE NOT USED IT AT ALL YET IT HAS MANAGED TO MESS UP MY EMAIL ADDRESS WHICH I HAVE BEEN USING FOR YEARS, IT ASKS FOR PASSWORD THEN REJECTS AND WHEN I TRY TO RESET WITH APPLE ID THEY ASK FOR SECURITY AS I CANNOT ACCESS THE EMAIL ADDRESS THEY HAVE FOR ME BECAUSE ICLOUD ASKS FOR PASSWORD, THEN APPLE TELL ME I DONT KNOW MY OWN DATE OF BIRTH, VERY CONFUSING

  • Ical birthday calendar wrong dates

    Hello,
    I have an issue with iCal regarding the birthday calendar.
    It works pretty fine syncing with address book, but it ads the birthday obviously twice. The birthday itself and the day before the birthday. When refering the URL in iCal it directs me to the Contact card of the person and there is only the correct date.
    Why does iCal do that? And more important, how can I solve that problem and remove all the wrong dates? Because it is anoying to have birthday reminders for people twice. It also looks pretty dumm in the notification center of Mountain Lion. With two birthdays of the same person in a row. Mostly it has one year difference as well, so the same person turns lets say 29 the one day and 30 the other.
    Any ideas?

    Thanks for your help.
    I've just checked forward into 2014 and I see that it doesn't re-occur  then.
    Strange, it's just one person and it's only happening in 2013. Their birthday is on 31st March and there's and entry for 31st Mar and 1st April.
    I'm not going to worry about it anymore.

  • How to find out Which LineItem is having the wrong data

    Hi All,
    This is Idoc--File scenario
    Iam sending the Idoc from R/3 and it may have several Line items and related data.
    If One line item data is wrong also the Idoc will be errored Out in MONI,for this i used UDF in mapping  to through the Exceptions. So i have to goto WE05 in R/3 and i have to check each and every line item for wrong data and then i will repost it.
    the thing is how can i find out the Particular line item is caused for this Error.
    REgards

    Hi Sarvesh,
    No, in MONI it will not take us to the correct Lineitem which is having the wrong data.
    That is only the problem here.
    Any Views.........
    Regards

Maybe you are looking for

  • Photos don't show up in file name order

    Photos don't show up in file name order on the iPad. Is there a way to do it?

  • Windows 8.1 Bluetooth LE connection error

    I've built a Bluetooth LE HID device which is a combined keyboard, mouse, and consumer device. All OS's can connect to it fine...except Windows 8.1, on all hardware. It connects and pairs, but then appears to fail perhaps when parsing the HID descrip

  • Rescuing a G4 and need help!

    Original hard drive in G4 started making bad noises and wouldn't boot. Was able to SuperDuper! it to my MacBook Pro (OSX 10.6) using an external enclosure and now have a .dmg file. The original drive then died -- less than two minutes after completio

  • Default printer on domain computers changes when print spooler is restarted

    Hi. It has been brought to my attention that all of my Windows 8.1 machines on our domain change their network default printers when the print spooler is restarted.  Printers are being assigned by group policy, using the print management tool, as Bra

  • Do we need to enter full email address in Incoming mail server settings on POP Account

    Do we need to enter full email address in Incoming mail server settings on POP Account or just the username? For example does it have to be [email protected] or only jim.nicholas works? How does it affect the way the emails are delivered between lapt