Regarding simple date format

Hi,
Can any one please tell what is simple date format for below format.
2008-11-04T11:49:04.312-04.00

Basil wrote:
I think all are getting confused with my question, I dont want to know how to convert date
to a a particular format, I want to know if there is any format for 2008-11-04T11:49:04.312-04.00
like yyyy-MM-dd'T'HH:mm:ss.SSS for 2008-11-04T11:49:04.312. My JDK version is 1.4
Edited by: Basil on Nov 4, 2008 7:43 AM
Edited by: Basil on Nov 4, 2008 7:43 AMRead the link for SimpleDateFormat and make one. How is that hard to understand? And it is what you have been being told from the beginning, and would have realised had you actually read the API docs pointed to. All the information you need to do so is there.

Similar Messages

  • Simple Date Format

    Hi,
    I have an entity object with some attributes, one of them is called "CREATED_ON", which i have specified as a history column (created on).
    I have specified a format type of Simple Date in my Control hint and a format of dd-MM-yyyy. I then created a view based on my entity and dragged the view as an adf creation form. I also dragged a commit button to commit my record.
    However, the date that is stored in my database have a non-zero time component (e.g. 10-JUL-2007 10:46:22). This is a problem becuase in my search form, the search criteria does not work (it requires the exact time also to work). I do not want to use TRUNC in my SQL query.
    Instead i want the date to be stored with the format mask that i have specified.
    Can you please help me?
    Thank you

    Do you really want to lose the time component altogether, or just make the query on date-without-time work?
    There would be no way of recovering the information about when during the day the row was created if you truncate the time information, but it's possible to achieve if that's what you want. Both are possible to achieve.
    To achieve the "losing the current time info forever" approach, add the following overridden method in your entity impl class that slightly changes the way the history attribute value is returned, in my case, for the HIREDATE attribute of an Emp example:
        protected Object getHistoryContextForAttribute(AttributeDefImpl attributeDefImpl) {
            Object ret = super.getHistoryContextForAttribute(attributeDefImpl);
            if (attributeDefImpl.getIndex() == HIREDATE) {
                ret = new Date(new java.sql.Date(((Date)ret).getValue().getTime()));
            return ret;
        }To achieve # 2 instead, just add a SQL-derived attribute to the view object with formula:
    TRUNC(HIREDATE)and then use that sql-derived attribute in the query form instead of the normal HIREDATE attribute.

  • Regarding a date format

    Dear All,
    I have a doubt regarding date formats.
    i have a date = Wed Jun 24 00:00:00 GMT+300 2009
    i want to convert this date in to 24.06.2009
    What i tried is
    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy");
    Date convertedDate = dateFormat.parse(value);
    SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
    String date = sdf.format(convertedDate);
    System.out.println(date);But my output was 24.06.0300Some thing happened to my Year field .
    Please help me to solve this ....
    Thanks and Regards,

    shashi_rajak wrote:
    "Wed Jun 24 00:00:00 GMT+300 2009" definetely it is not in "General time zone" and "RFC 822 time zone format". But the [SimpleDateFormat api|http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html] tell this also
    SimpleDateFormat also supports localized date and time pattern strings. In these strings, the pattern letters described above may be replaced with other, locale dependent, pattern letters. SimpleDateFormat does not deal with the localization of text other than the pattern letters; that's up to the client of the class.
    That's not saying anything about changing what the various bits do, though. It's just saying that a particular Locale might use a different letter sequence to represent hours..."XX" instead of "HH", for example. But the Locale equivalent of "z" would still expect the format "GMT+3:00".
    hey sha_2008 can you tell what values these methods " toLocalizedPattern()" and " toPattern()" returns on SimpleDateFormat object which created the "Wed Jun 24 00:00:00 GMT+300 2009" string.The OP hasn't mentioned anything about how he got the original date string, so we can't assume it came from another SimpleDateFormat object. In fact, it clearly hasn't.

  • Help :  Simple Date Formats Problem in JDev11 [TP4] ?

    Hi ;
    I use ADF/JSF in JDeveloper 11 [TP4].
    in JSF Page
    what can I do to enter Date format mask dd-mm-yyyy hh:mi:ss
    to Return my Date Format mask like
    mi-mm-yyyy meaning minute-month-year
    in another column ?
    and I know The format mask is defined in a File called formatinfo.xml .
    Thanks & Regards
    Forakora

    Hi,
    if it is for display then you don't need to change it in the model but can link the output text component to a managed bean that gets the stored date value to then change it to the format you prefer. This however may not be suitable if the date should be updated from that column

  • Need help regarding Simple Data Client and Simple Data Server VIs

    Hi everyone.
    I have a simple objective. I just want to test the 2 example VIs, "Simple Data Client" and "Simple Data Server" between 2 computers. I just want to check whether is this working between the 2 computers.
    What I have done for now is that I changed the "address", from "localhost" in the "Simple Data Client.vi" to the IP address of the computer running the "Simple Data Server". I runned the "Simple Data Server" VI in one of the computers first followed by the "Simple Data Client" in the other computer. Nothing is received and the client just timed out.
    Can anyone please help me troubleshoot and tell me what are the possible problems for this? Are there any wires connections between 2 computers that I am missing or any other configurations I have to make before I can successfully do this?
    Thanks.
    Regards,
    Jonathan

    Hi Lee.P.
    I understand that. I was just feeling frustrated about the project not working. Sincere apologies from me.
    I was wrong about the error number. It is not Error 60. It is Error 59 - The network is down, unreachable, or has been reset.. Yes, I have tried changing the port numbers at the 2 computers when trying to send/receive.
    Could anything else be the problem?
    Regards,
    Jonathan  

  • Simple date format update/cleansing not working

    Dear All,
    Some rows are not being updated after update
    create table X(
    Surname varchar2(20),
    dob varchar2(20),
    dobupdate varchar2(20));
    insert into X values('Hookman','22-Apr-78','22-Apr-78');
    insert into X values('Beverly','21/06/1966','21/06/1966');
    insert into X values('Wickham','01/23/1985','01/23/1985');
    insert into X values('Logmann','26/Dec/1972','26/Dec/1972');
    insert into X values('Scooby','30.04.1966','30.04.1966');
    insert into X values('Trumph','15-August-1967','15-August-1967');
    insert into X values('Delaware','Aug-03-1961','Aug-03-1961');
    insert into X values('Wicked','03.Sep.1961','03.Sep.1961');
    insert into X values('Orlando','18.September.1961','18.September.1961');
    SURNAME DOB DOBUPDATE
    Hookman 22-Apr-78 22-Apr-78
    Beverly 21/06/1966 21/06/1966
    Wickham 01/23/1985 01/23/1985
    Logmann 26/Dec/1972 26-DEC-1972
    Scooby 30.04.1966 30-APR-1966
    Trumph 15-August-1967 15-August-1967
    Delaware Aug-03-1961 03-AUG-1961
    Wicked 03.Sep.1961 03-SEP-1961
    Orlando 18.September.1961 18.September.1961
    9 rows selected.
    =====================================
    --Code below is meant to update person Beverly
    Update x set dobupdate = to_char(to_date(dobupdate,'DD/MM/YYYY'),'DD-MON-YYYY')
    where dobupdate like '__/__/____';
    error - not valid month
    =======================================================
    --Code below is meant to update person  Trumph
    Update x set dobupdate = to_char(to_date(dobupdate,'DD-MONTH-YYYY'),'DD-MON-YYYY')
    where dobupdate like '__-_____-____';
    0 row/s updated
    =========================================================
    --Code below is meant to update person Orlando
    Update x set dobupdate = to_char(to_date(dobupdate,'DD.MMMM.YYYY'),'DD-MON-YYYY')
    where dobupdate like '__._____.____';
    0 row/s updated
    Where am I going wrong. I hvae no problems with updating other records in the table except fot just these three patterns.
    Help please.
    Cube60

    Thanks Warren, both suggested codes did not work and I can see why now. Alex has pointed it out.
    Alex brought me to realise Wickham's DOB is in the American format. The update query could not resolve that format and how to update it but at least it could have updated that of Beverly and left that of Wickham.
    After deleting Wickham completely, the update query worked on Beverly.
    Am just doing some data cleansing from a poorly designed Access database now meant for Oracle.
    So nothing can be done to resolve such mixture of date formats, I mean Uk and American.
    But now, Why are the update statement below coming with 0 records updated.
    The dates to be update are written like this 15-August-1967 and 18.September.1961 respectively
    --Code below is meant to update person Trump
    Update x set dobupdate = to_char(to_date(dobupdate,'DD-MM-YYYY'),'DD-MON-YYYY')
    where dobupdate like '__-__-____';
    0 row/s updated
    =========================================================
    --Code below is meant to update person Orlando
    Update x set dobupdate = to_char(to_date(dobupdate,'DD.MMMM.YYYY'),'DD-MON-YYYY')
    where dobupdate like '__._____.____';
    0 row/s updated
    many thanks
    cube60
    Message was edited by:
    cube60

  • Regarding java.util.date / simple date format

    Hi Friends,
    I have a weired requirement where I am suppose to get time in millisecond for 3 scenarios.
    1. next 07:00 time
    2. next monday 07:00
    3. on next 1st 07:00
    Swing provides some jar where I can get next day - but not sure if I can play around to get my data.
    need your inputs.
    appreciate your quick reply friends,
    Chintan
    P.S. the reason I have to do so is
    1. I have 3 kind of reports - few reports expire daily - few weekly - few monthly.
    2. I am going to fetch the report from the external system and store (cache) in my db.
    3. Administrator can configure that when exactly the report is going to be updated in external system.
    4. So lets say for daily - every day at 7 it will be updated - so when I read the cached data, I want to compare the stored time stamp with next 7:00 time stamp and if my stored timestamp is less than next 7:00 time stamp - i can use the cached data and similarly for weekly and monthly.
    Please let me know if you have more questions.

    I'll just add an example.
    say I added a report to DB at 1188563489217 and my
    cutoff is weekly that is on next monday at 7:00 in
    the morning - at that time my milliseconds would be
    1188783033888
    now as far as my stored milliseconds are less than
    1188783033888 i can read it from my db and if my
    stored milliseconds are greater than 1188783033888
    then I need to refetch the report.
    Now for this task - every time i make a call to my DB
    - i have to get time in milli seconds for next monday
    7:00.
    Is it possible??
    I am badly struck over here - please guide.
    Chintan
    Appreciate your help buddies.
    ChintanTake the hint if the date string is 35:11:2007 07:00 in dd:MM:yyyy HH:mm format then the parsed date will be 05:12:2007 07:00.
    your problem is actually a piece of cake ;-)

  • Regarding the date format

    Hi,
    My requirement is:
    We have to generate a batch number in such a way that
    the first character should be the last digit of the current date
    the second character should be the month identifier(1-9 from Jan to sept and for the rest Oct-A Nov-B and Dec-C)
    the third character should be the day identifier(for dates 1-9,its 1,2..9 and for the rest consecutive dates starting frm a,b,...v)
    Please help me how to achive this.

    Hi
       U can do this by using Character String Operations on DATE and based on value use IFELSE control statement.
       like ur DATE is 20081202 then
                          if date+6(2) = 01.
                            c3 = 1.
                          elseif date+6(2) = 02.
                          endif.
    but this is simple way , u can find some more optamize way.
    Regards
    Sachin

  • Simple date format with 1st 2nd 3rd etc

    hai
    i want to dispaly the date in the format
    25th of December 2004
    i tryed to format in SimpleDateFormat, but there is not special format to display date as 1st 2nd 3rd.
    can anybody help me how to do this
    Archi

    THANKS YOU
    THANKS FOR YOUR VALUABLE RESPONSE
    THAT I KNOW VERY VERY WELL HOW TO DO THAT.
    ITS URGENT I DONT WANT TO WASTE TO "INVENT A NEW STUFF"
    ARCHI.

  • Reading simple date format

    Hi,
    I am attempting to use the simpledateformat in Java. I want it to read the inputted code, and store it, and then print it out again...
    Here is what I have so far:
    import java.util.*;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class Date     {
         //For date :
         static DateFormat df = new SimpleDateFormat("dd-mm-yyyy");
         public static void main(String[] args)
              //for date in form (dd-mm-yyyy)
              //reads input fromm keyboard
              Scanner data = new Scanner(System.in);
              //Asks for you to type in date.
              System.out.println("Useby date: (dd-mm-yyyy)");
              //Takes input as string value
              String input = data.next();
              Date useby = null;
              try
                   useby = df.parse(input);
              catch (ParseException e)
                   e.printStackTrace();
              //Prints useby date.
              System.out.println("Useby date: " + df.format(useby));
    The line:
                   useby = df.parse(input);
    States that there is a type mismatch... "cannot convert from Date to Date"??? What does this mean???
    I am unsure as to what all these lines mean as I got them off the net and was unsure about some of them...
    If some1 could help it would be very much appreciated.
    Thanks.

    I think your code is getting confused between java.util.Date and your own class's name, which is Date. Rename your class, and you should be fine.
    By the way, please use code tags when posting code. See CODE button above posting box. That will format your code such that it is much more readable.

  • Does Simple Date Format suppourts This convrsion??

    Hi ,
    I am getting this Date as String
    String str = "Fri May 13 2011 19:59:09 GMT 0530 (India Standard Time)";
    How to convert this Date Object into yyyy-mm-dd HH24:Mi:ss Format ??
    I have not seen any example using SimpleDateFormat with this format ??
    Please can anybody please show me how to do this ??

    user10503747 wrote:
    Hi ,
    I am getting this Date as String
    String str = "Fri May 13 2011 19:59:09 GMT 0530 (India Standard Time)";
    How to convert this Date Object into yyyy-mm-dd HH24:Mi:ss Format ??
    I have not seen any example using SimpleDateFormat with this format ??
    Please can anybody please show me how to do this ??The following works for me.
    String str = "Fri May 13 2011 19:59:09 GMT 0530 (India Standard Time)";
    str = str.replace("GMT ", "GMT +");
    SimpleDateFormat sf = new SimpleDateFormat("EEE MMMMMMMMMMM d yyyy H:m:s 'GMT' Z");Although not relevant to your actual problem the above will not work if '-' is used instead of the '+'. No idea why that is. It parses but seems to ignore the offset in that case.

  • Simple Date Format problem

    I am having trouble with the following code. It works fine on one computer but not on another.
    Calendar cal = Calendar.getInstance(TimeZone.getDefault());
    Date date22 = cal.getTime();
    System.out.println(date22);
    String details = sdf.format(date22);
    System.out.println(details);
    StringTokenizer str = new StringTokenizer(details, "-", false);
    The working ones output is:
    Thu Jul 14 12:06:33 GMT 2005
    14-07-2005-12-06-33
    However on the computer where it doesn't work, I get this:
    Fri Aug 05 13:13:59 BST 2005
    Exception in thread "Thread-0" java.lang.NullPointerException
    Which point to line: String details = sdf.format(date22);
    From what I can see, the only difference is BST instead of GMT, but I can't seem to change this.
    It is running under Windows.
    Any help will be MUCH appreciated, as I am stumped!
    Thanks. :)

    The difference is that in the latter sdf is never assigned a non-null value. Since you didn't post the code that initializes sdf, we've got no way of knowing what went wrong.

  • Simple Date Formatting

    I am a newbie to Java and was wondering if anyone knew of a easy way to format and date without having to write a whole function to format a date??

    I need more information what you are trying to do?
    Do you want to convert a string to a date are a date in one format to other.
    I suggest you to go through the following class API
    SimpleDateFormat
    Hope this will help you get some info about formatting
    Happy Coding
    Sampath

  • Format date with simple date format

    Hello
    I want to parse String to date. My method is
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    Then
    Date date = dateFormat.parse("2007-17-1100 11:11");
    It can be seen that the String "2007-17-1100" is invalid date. However, I donot know why it still can be parsed. Result is "Thu May 05 11:11:00 NZST 2011"
    Could you please explain. I want this one cannot be parsed.
    Many thanks
    shoa

    SimpleDateFormat dateFormat = new
    SimpleDateFormat("yyyy-MM-dd HH:mm");
    Then
    Date date = dateFormat.parse("2007-17-110011:11");
    >
    IIn my knowledge there is only 12 months in a Year.There are. But as long as the parsing is 'lenient' it knows how to handle month numbers greater than 12.
    @OP: Check out the setLenient() method. A setLenient(false) should make it work the way you want.

  • Simple date format probem

    i wrote a method to convert a String to Calendar, but i have an error.
    The calendar object generated always has the month set to january and i don´t know why.
    This is my code
         static SimpleDateFormat df=new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
                          public static Calendar dateString2Calendar(String s) throws ParseException {
              Calendar cal=Calendar.getInstance();
              Date d1=df.parse(s);
              cal.setTime(d1);
              return cal;
         }  if the source String is: 2008-09-04 17:54:09 my Calendar gets the value: Fri Jan 04 17:54:09 CET 2008
    Where is my mystake?
    Regards

    upps i am feeling very very stupid....
    anyway thanks BigDaddyLoveHandles !!!!!!!

Maybe you are looking for

  • Can I import more than one song at a time?

    Hello all, this is my first post so go easy on me...lol I just purchased my first iPOD today and seem to notice so far that I can only import one song at a time into iTunes library. I cannot select more than one song at a time by holding down the shi

  • Photos - camera connector

    I am considering buying an iPad to take on a trip instead of my laptop. I want to back up pictures from camera, via the camera connector. My questions are: 1. Does it leave the pictures as they are, or it "optimizes" them? This is what the iPhone or

  • Matrix - Help with setting 1st column for line numbers

    Hi, I have created a matrix on a custom form and would like to add line numbers to the # column line that of the quotation screen. The matrix itself is populated correct from the Query and LoadFromDataSource, and all the fields and columns are filled

  • I can't sign in to my account on itunes

    every time I try to sign in to my account, I get the error "we couldn't complete your itunes store request.The itunes store is temperoraily unavailable. please try again later.".  I tried to sign in from different PC but I couldn't sign in. I can sig

  • Merging Two JSF, ADF BC Web Applications into One web application

    What would be the best way to take two JSF, ADF BC web applications written by two developers and merge them into one web application. Any place to start would be greatly appreciated. I'm using Oracle JDeveloper - 11.1.1.4.0 Edited by: Sunanda on Jul