Hard time inconverting object to date...please urgent

Hi,
I have obect .eg:In my object I have "Fri Jun 08 11:14:21 PDT 2007".
I am tryoing to convert into date .
This is how I am doing.
                               SimpleDateFormat df=new SimpleDateFormat("EEE MMM dd HH:mm:ss z YYYY");
                            Date     date=df.parse(object);I am getting Unparseable date: "Fri Jun 08 11:14:21 PDT 2007" error.
Please help me

Works for me, with yyyy, not YYYY:
import java.text.*;
import java.util.*;
public class DateExample {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
        String s = "Fri Jun 08 11:14:21 PDT 2007";
        Date parsed = format.parse(s);
        System.out.println(parsed);
}

Similar Messages

  • Need help with dates  please-urgent

    Hi folks, please help me with this if you can.
    I run a weekly job, and need to have my java code create and use 2 dates to capture data for the whole week.
    begin_date mm/dd/yyyy (String) to be 7 days prior to current date
    end_date mm/dd/yyyy (String) to be the currecnt date
    Note: please take into account the cases where the CURRENT_DATE is the first week of the month. As a result the 7 days prior will fall into the previous month. i.e if end_date="06/04/2003" then the begin_date will be "05/29/2003 Thanks a bunch

    http://java.sun.com/j2se/1.4.1/docs/api/index.html
    See the Calendar and DateFormat classes.

  • For my iphone 4S, people can hear me sometimes but i can't hear them. I am having a hard time making phone calls. Please help me if you can.

    I can't hear my callers but i hear them sometimes. It makes some weird cracking sound.

    Apple just announced new products.  It is ALWAYS busy this time of year.  You just have to deal with it.
    Alternatively, you can contact Apple Support and get assistance that way.  Worst case scenario, they'll require a $19 fee to troubleshoot your device over the phone, which is refunded if it turns out you have a hardware issue.
    Try them at https://getsupport.apple.com or 1-800-MYAPPLE and see if they can help.
    But also try this:
    Basic Troubleshooting Steps when all else fails
    Quit the App by opening multi-tasking bar, holding down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.
    Relaunch the App and try again.
    Restart the device. http://support.apple.com/kb/ht1430
    Reset the device. (Same article as above.)
    Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • My computer is having a real hard time with the up date

    My e mail stopped opening things. so I'm trying to find out what is wrong. I see an update is needed and I try but I get that error code. I have windows 8. (and hate it) what do I do?

    vnlgaitan wrote:
    My e mail stopped opening things.
    I have no idea what this means.
    You also write about an error code, but fail to provide it.

  • Can somebody provide a real time dummy object regarding BADI

    hi guru.
    it's urgent.can somebody provide a real time dummy object regarding BADI.
    please forward me.
    deffinitely good points waiting for u.
    thanks&regards.
    subhasis.

    Please check .
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm

  • Time series objects and order objects on what condtion we need to use

    Dear Experts ,
    I have question regarding Time series objects and order objects
    from my understanding
    TIme series objects the data is stored in time buckets without
    reference to orders.
    Order objects the data is stored as orders. Key figure data is
    then saved as orders if semantic 000 is entered in the detail view of the key
    figures in the planning area.
    my question is when to use the option 1 and when should not use
    same for option 2
    Many thanks
    Regards
    Raj

    Hi,
    This depends on the requirement you have also the application you are using.Like DP key figures are generally time series since in DP you do not need order numbers for example for history sales the requirement is the quantity period wise but not the order numbers.
    Again in SNP the distribution and planned quantities are required order wisecoz you need the order numbers you execute the same in ECC system or for Pegging purposes.
    Now the safety stock requirement can not be at order series since this is with relevent to some periods.
    So overall i can say this depends on the requirement of the kay figure.
    Hope this can help.
    regards,
    kaushik

  • SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.

    Hi
    I am trying to upload data using SQL loader. There are three columns in the table
    defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
    I have also tried with to_date --> to_timestamp it did not work.
    The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
    LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
    CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
    LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"

    Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
    SQL> desc t
    Name                                      Null?    Type
    LASTWRITTEN                                        DATE
    CREATEDON                                          DATE
    LASTUPDATEDON                                      DATE
    SQL> select * from t;
    no rows selected
    SQL> !cat t.ctl
    LOAD DATA
    INFILE *
    INTO TABLE T
    TRUNCATE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    LASTWRITTEN
    "decode(:LASTWRITTEN,'null',cast(Null as date),
      to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
    CREATEDON
    "decode(:CREATEDON,'null',cast(Null as date),
      to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
    LASTUPDATEDON
    "decode(:LASTUPDATEDON,'null',cast(Null as date),
      to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
    BEGINDATA
    2007-02-15 15:10:20,null,null
    null,2007-02-15 15:10:20,null
    null,null,15/02/2007 15:10:20
    SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> select * from t;
    LASTWRITTEN         CREATEDON           LASTUPDATEDON
    15.02.2007 15:10:20
                        15.02.2007 15:10:20
                                            15.02.2007 15:10:20Best regards
    Maxim

  • I have a Time Capsule with 2tb of storage, and an I-Mac with 500Gb. (which is at capacity) Can I use the Time Capsule to store data in addition to backing up the hard drive?

    I have a Time Capsule with 2tb of storage, and an I-Mac with 500Gb. (which is at capacity) Can I use the Time Capsule to store data from my hard drive that I want to access later in addition to backing up the hard drive?

    Can I use the Time Capsule to store data from my hard drive that I want to access later in addition to backing up the hard drive?
    Yes, but if you move the "original" data on your iMac to the Time Capsule....then the "original" data is now on the Time Capsule disk. 
    When...not if...the Time Capsule disk has a problem, you have no backups for this data.
    Perhaps a much safer plan might be to add an external hard drive attached directly to your iMac. Then, move the data to that drive from the iMac.
    Now, Time Machine will back up both your iMac and the external hard drive so you have "originals" on one drive and backups on another. Would that plan work for you?

  • I have lost my calendar data and am having a hard time retrieving it from Time Capsule. Can anyone help? I am using Mountain lion OS

    I have lost my iCal data and am having a hard time retrieving it from Time Capsule. I am using Mountain Lion OS om iMac. Can anyone help?

    You cannot see it because it is hidden.. one of those great things apple does.. if it is hidden in your Mac then it will be hidden in the Time Machine Backup.
    You will need to restore the entire folder to a different location.. and unhide it.
    There is some info here about restoring particular files or folders.
    http://pondini.org/TM/16.html
    And some info from Lion which should also relate to Mountain Lion.
    https://discussions.apple.com/thread/3231381?start=0&tstart=0
    There is stuff about recovery near the end.
    One wonders sometimes when Apple make these decisions if they ever think about what happens when something goes wrong. Hiding files..???

  • How do I get date and time component from a DATE object?

    Hi All,
    I need to get date and time separately from a DATE object, does
    anyone know what function I should call? GetDate()? GetTime()?
    I need this in a SELECT statement.
    Thanks in advance and looking forward to your early reply.
    Regards.
    Gladywin
    30/11/2001

    Hello,
    See following SQL.
    select to_char(sysdate,'dd/mm/rrrr') today_date,
    to_char(sysdate,'hh24:mi') now_time
    from dual
    Adi

  • HT201250 Circle and cross through iTunes icon afte the seagate hard drive replaced and restored data from time machine backup.

    Circle and cross through iTunes icon: had the seagate hard drive replaced and restored data from time machine backup. Why does the iTunes icon have a circle and cross through it? As though incomplete? tried everything and still Circle and cross through iTunes icon.

    No it isn't something you'd find on the computer, it has to be custom installed from the 10.6 installer disc or Software Update if it wasn't before.  It allows you to use older PowerPC applications on your Mac.   On the other hand double check the version of iTunes you have does not require 10.7 minimum either.

  • How can i format my MacBook Pro hard disk and recover my data from time capsule?

    Hello,
    My MacBook Pro is running slow, more and more. Everything started with the "upgrade" to Lion.
    Can I re-format my hard disk and recover from Time Capsule only the data and applications I really need (including Snow Leopard as OS, maybe)?
    Thanks

    The problem is that it is a Western Digital 3.5 inch internal hard drive housed inside a hard drive caddy. So the only way to connect it to my computer is through a dock.

  • I have a macbook pro with 250 GB of Space, 2.2 Processor, 16 GB of Memory 1600MHz, and Intel Iris Pro 1536. I backed up my apps using iTunes but I am having a hard time restoring my apps back to my iPhone 5s so could you please help me?

      I have a macbook pro with 250 GB of Space, 2.2 Processor, 16 GB of Memory 1600MHz, and Intel Iris Pro 1536. I backed up my apps using iTunes but I am having a hard time restoring my apps back to my iPhone 5s so could you please help me?

    So did you ever get your apps back on your iPhone?

  • I am having a hard time with fcpx, it is running so slow.  i upgraded my ram to 12 and have cleaned up my computer to run faster and have changed all my files to proxy files but it is still running SO slow.  please help!

    I am having a hard time with my fcp x running so slow.  i can't even move my mouse without the time wheel coming on and staying up for at least 20 some seconds.  I have upgraded my ram to 12 and changed all my files to proxy files; also i cleaned the crap out of my computer removing all other media files I didn't need and it is still running the same.  Please help!  I have a deadline on my short film to be submitted and I can't finish it like this.  Oh also it ran fine in the beginning but and one day it just started doing this out of no where.  Anything will help!  Thanks

    In addition have you got FileVault switched on as that will kill performance.

  • I had backed up my IPhone 4s on iCloud on Jan 19. I am now trying to do another back up but it says the time required is 7 hours. It appears to long a time for 1GB of data stored on the iCloud. Can someone help me please?

    I had backed up my IPhone 4s on iCloud on Jan 19. I am now trying to do another back up but it says the time required is 7 hours. It appears to long a time for 1GB of data stored on the iCloud. Can someone help me please?

    To be honest, that sounds about right.
    For example on my 8Mbps (megbits) down service I get around 0.4Mbps upload.  That is the equivalent of (very approximately) 3Mb (megabytes) per minute or 180Mb per hour.  Over 7 hours that would be just over 1Gb.
    Obviously, it all depends on your connection speed, but that is certainly what I would expect, and that is why I use my computer for backing up, not iCloud.  So much quicker.

Maybe you are looking for

  • Animating .gif on .gif background

    hi, i am making a little fish game where you can click directional buttons to move fish .gifs around a fish tank. i am trying to display .gif pictures of fish on top of my background, im struggling with paint and update and layeredpanes and whether t

  • Change Column Header / Column Background color based on a value in a specific row in the same column

    SSRS 2012 Dataset (40 columns) including the first 3 rows for Report layout configuration (eg: the <second> row specifies the column background color). Starting from the 4th row, the dataset contains data to be displayed. I would like to change the b

  • Update Supplier Using Supplier Interface

    I am trying to update the terms of some existing suppliers using supplier interface and I am hitting the following errors: 100002 ABEC LTD. Supplier Number is invalid 100002 ABEC LTD. Supplier name already exists. 100002 ABEC LTD. This Supplier Numbe

  • Purchase Requisition Field Mandatory

    Dear All,              I want to make purchase requisition field mandatory in selected purchase order types. i tried through field selection in SPRO, by changing the screen layout., but still its not coming as mandatory. Kindly provide a solution ...

  • How to create Query (Sq01) fro service contract

    hi, How to create Query for Service contracts , where i need to take a report for sub line items of that particular Service contract. Ex: we maintain short text - services in the initial screen ,        in the next screen we maintain the sub line ite