Conversion of one date format to another format..

Hi all..
Please help me out in this...
I want to convert the following ...
Fri May 25 17:49:34 2007 to[b] 2007-05-25 17:49:34
Help me out of this ...
Thanks in Advance .....

Fri May 25 17:49:34 2007 to[b] 2007-05-25 17:49:34 If what you have already is of type java.util.Date, then just use formatting:
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(yourDate)If it's a String only, then you need to do conversion:
SimpleDateFormat from = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
SimpleDateFormat to = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
to.format(from.parse(yourString))

Similar Messages

  • Converting  audio file from one format to another format

    Hi Friends,
    Is it possible to convert the audio file from one format to another format(*.mp3 to *.wav file and vice versa)?
    If so, please guide me on the same.
    Thanks in advance,
    Kavitha Anbazhagan

    It's been covered here already, but take a look here:
    Converting CDs to iTunes Audiobooks
    Just read the parts after the section on importing from CD.
    Regards.
    Message was edited by: Dave Sawyer

  • Is there a way other than redeployment to migrate existing Cloud Services from one data center to another?

    We have a need to correct affinity of Cloud Service, Azure DB, Storage and Mobile Services such that they are on a singl datacenter and do not get impacted by network latency when these components communicate with each other. Also to distribute various environments
    across different data centers we need to realign some environments to mitigate all environments getting impacted if there is outage.
    Existing Cloud Services and related Service Bus queues and topics need to be moved to a different datacenter. Is there a way to do this without having to redeploy cloud services (web and worker roles) or recreate the service bus entities (queues and topics)?
    Also, the existing Cloud Service URL need to be retained without with user authentication won't be possible and hence when completed, the new cloud service should have the same URL.
    Please provide best available options for achieving this or ask question if more information is needed.

    Hi sumeetd,
    As far as I know, currently there is no directly way to move services from one data center to another unless redeployment. You could submit a feature suggestion via this page (http://feedback.azure.com/forums/34192--general-feedback
    ). And at the same time,you could contact with azure support team via the channel below:
    http://www.windowsazure.com/en-us/support/contact/
    Any questions, please feel free to let me know.
    Regards,
    Will
    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.
    Click
    HERE to participate the survey.

  • How to switch from  one Data base to another data base

    Hi,
    How to switch from one Data base to another data base if first data base server like in restoring,blocking,network disconnected state.
    Please help out for the same.
    Regards,
    Anilkumar

    Sounds like a problem for forums/support from the DB provider, as this problem is normally solved through some form of HA provided by the DB (or some cluster software, but still not Java) with, normally, a shared (virtual) IP address.

  • ADF UIX Passing values from one Data Control to another

    How to transfer value of any column in the selected row of the table (one data control) to the messageTextInput, based on another Data Control?
    It may be on a single UIX-page or on different pages.
    Thank you.

    HI Prithviraj,
    The problem screen shot is as follows:
    The First Applicant is coming from one sub report and the second applicant is coming from another sub report. It is working fine from Crystal reports. But in the Crystal report viewer i am unable to get the out come as 1,2,3.
    If you need any additional information please let me know.
    Thanks
    Penchal

  • How to converse the avi,dat,mpg,mov,wmv format into rm format??

    plz

    I suppose you mean convert?
    We don't supply conversion for audio and video filetypes like we do for the image types. One reason is that the audio and video types have many proprietary formats.
    I think you could use JMF or other public domain software for this purpose.
    Larry

  • Converting odd date format to another format

    Hey all,
    I have a date format that looks like this: "2006-08-29T00:00:00.000Z"
    so i have written this code:
    DateFormat dFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss:SSSZ");when i try to do
    dFormat.parse("2006-08-29T00:00:00.000Z");i get this: java.text.ParseException: Unparseable date: "2006-08-29T00:00:00.000Z"
    Does anyone know what i am doing wrong?

    I'm still getting it:
    Here's my code now:
    String temp = "2006-08-29T00:00:00.000Z";
             DateFormat dFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss:SSS'Z'");
             try {
                   dFormat.parse(temp);
              } catch (ParseException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              }

  • Changing datetime format to another format in exixting table

    Hi i am using oracle11g version
    here i have one problem
    suppose datetime value which is in string format is 4/13/2012 03:55 PM in table
    now I want to update format to 04/13/2012 15:55 in table

    913672 wrote:
    Hi i am using oracle11g version
    here i have one problem
    suppose datetime value which is in string format is 4/13/2012 03:55 PM in table
    now I want to update format to 04/13/2012 15:55 in tableOk, so let's suppose you have a table and it has a DATE datatype column on it.
    When you're querying your data you see something like this...
    SQL> select dt from mydates;
    DT
    08/08/2012 09:41:51 AM
    08/07/2012 09:41:51 AM
    08/06/2012 09:41:51 AM
    08/05/2012 09:41:51 AM
    08/04/2012 09:41:51 AM
    08/03/2012 09:41:51 AM
    08/02/2012 09:41:51 AM
    08/01/2012 09:41:51 AM
    07/31/2012 09:41:51 AM
    07/30/2012 09:41:51 AM
    10 rows selected.Internally though, the dates are not stored in that format, that's just how they are displayed to you.
    Let's look at the internal format... (we can see a representation of the bytes of data values using the DUMP function)...
    SQL> col dmp format a40
    SQL> select dt, dump(dt) as dmp from mydates;
    DT                     DMP
    08/08/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,8,10,42,52
    08/07/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,7,10,42,52
    08/06/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,6,10,42,52
    08/05/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,5,10,42,52
    08/04/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,4,10,42,52
    08/03/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,3,10,42,52
    08/02/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,2,10,42,52
    08/01/2012 09:41:51 AM Typ=12 Len=7: 120,112,8,1,10,42,52
    07/31/2012 09:41:51 AM Typ=12 Len=7: 120,112,7,31,10,42,52
    07/30/2012 09:41:51 AM Typ=12 Len=7: 120,112,7,30,10,42,52
    10 rows selected.So, what happens if I chance the date format for my session...
    SQL> alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS';
    Session altered.
    SQL> select dt, dump(dt) as dmp from mydates;
    DT                  DMP
    08/08/2012 09:41:51 Typ=12 Len=7: 120,112,8,8,10,42,52
    08/07/2012 09:41:51 Typ=12 Len=7: 120,112,8,7,10,42,52
    08/06/2012 09:41:51 Typ=12 Len=7: 120,112,8,6,10,42,52
    08/05/2012 09:41:51 Typ=12 Len=7: 120,112,8,5,10,42,52
    08/04/2012 09:41:51 Typ=12 Len=7: 120,112,8,4,10,42,52
    08/03/2012 09:41:51 Typ=12 Len=7: 120,112,8,3,10,42,52
    08/02/2012 09:41:51 Typ=12 Len=7: 120,112,8,2,10,42,52
    08/01/2012 09:41:51 Typ=12 Len=7: 120,112,8,1,10,42,52
    07/31/2012 09:41:51 Typ=12 Len=7: 120,112,7,31,10,42,52
    07/30/2012 09:41:51 Typ=12 Len=7: 120,112,7,30,10,42,52
    10 rows selected.The dates are now displayed in the format I want, though the internal representation or bytes hasn't changed at all.
    Don't worry about the "format" of how the dates are stored on the database. Just remember that "format" relates to how things are displayed at the front end and can be controlled either through settings like NLS_DATE_FORMAT, or by using functions such as TO_CHAR when you query the data.
    Never consider storing the data in a different datatype than what is most suitable for it i.e. don't store DATE values as VARCHAR2, as this will cause you major problems later on. Store DATEs as DATE or TIMESTAMP datatypes, store numbers as NUMBER (or equivalent numeric datatype), store strings as VARCHAR2 etc.

  • How can I transfer data form one data store to another iview /dats store

    Hello,
    I have two iview and want to transfer the data from my data store (main iview) to the nested iview (or the data store in nested iview)
    Can you give me instructions, how I can implement this with the signal in and outports.
    Thanks
    Bst regards
    thomas
    I

    Hi Thomas
    Pass the output data of one iview to another(by connecting the output of the 1st to the input of the 2nd) and then <b>Signal Out</b> the combined data of the two iviews from the 2nd iView using a <b>event</b>(say, a submit button) from the 2nd iView.
    Connect the <b>signal out</b> to the nested iView(main iView) by composing a <b>Signal In</b> on the nested iView.
    Next, inside the nested iView design layout push the values from <b>Signal In to a data store.</b>
    Now you could access all the data @datastore from any no. of forms inside the nested iViews.
    Regards
    Navneet

  • How to Write a file from hex format to another format

    hi I am trying to create a file (IBM AFP-printer format) from the hex file which i have created after reading that IBM afp file. Now i have to do some changes in that hex file data and store it back to the same format.
    I have tryed storing it using:
    Writer out = new OutputStreamWriter(outputStream,"Cp1252");
    but it is taking hex format only.
    I have checked encoding of afp file by this code
    File inputFile = new File( "C:\\ACode\\new2.afp" ) ;
              FileInputStream inputStream = new FileInputStream(inputFile );
         InputStreamReader in = new InputStreamReader(inputStream);
    System.out.println(in.getEncoding());
    it is showing Cp1252 only.
    But i am unable to store it back to same format
    Thanks

    I don't really know what the IBM APF stream format is, but I suspect that your approach is not right. If you really want to read and write raw hex bytes, then do not use readers and writers; instead use pure streams. The reason is that readers and writers are designed to deal with character-oriented data, and will automatically perform translations on input and output.
    On the other hand, if you could find the correct encoding/decoding software for the IBM format in question, well then readers/writers would be fine, and you could do all of your "internal" work in unicode.

  • One data set inside another

    I have a list with data source A, which contains a ClientName, some dates, and a dollar amount.  This is all displayed within a list, one client per row.  I also have data source B, which also has ClientName and a list of notes about the client.
     What I want to do is add another simple table in the SAME ROW as the table containing ClientName, dates, and dollar amounts.  When I go to add the table below my other information I cannot choose data set B as the source of my data.  I just
    want to add this simple table and automatically filter all notes from data source B to have the same ClientName as the current item in the list.  Is this possible?
    Thanks!

    If you need to use a totally separate dataset (not datasource, that is the thing that connects to your database), inside a table, you might be better off creating a subreport.
    The subreport will have this dataset B, then you can drop a subreport into your main report table cell and pass the parameters through.

  • Conversion of a data object of type "C" to type "l" is not supported

    Experts:
    i have below code in my FM; defined as remote-enabled module.
    when i execute i get the error analysis as:
      You attempted to move one data object to another.
    This is not possible here because the conversion of a data object
      of type "C" to type "l" is not supported.
    This at the line    move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
    what are the steps to debug this?  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE any.
      data:st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      loop at T_UPDATE into wa_ZSTRESULT.
        assign wa_ZSTRESULT-field to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign wa_ZSTRESULT-VALUE to <FS2>.
        move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

    resolved using GET REFERENCE.. code looks as below:  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE DATA.
      TYPES t_dref TYPE REF TO DATA.
      DATA dref TYPE REF TO DATA.
      DATA: TT_UPDATE TYPE ZTYRESULT.
      FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
      data:   st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      TT_UPDATE = T_UPDATE.
      loop at TT_UPDATE assigning <WA_UPDATE>.
        assign <WA_UPDATE>-FIELD to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign <WA_UPDATE>-VALUE  to  <FS2>.
        GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
    *    MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
        <wwa_mdm_name_value_pair>-VALUE = dref.
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

  • When one ScriptUI palette opens another

    I have two general-purpose ScriptUI palettes (one for Indesign and one for InCopy) that calls a smaller palette (which works in both applications) using a doScript() command. I've done the same thing for ScriptUI dialogs, which works just fine because the dialog must be dismissed before the user can do anything else.
    With a floating palette, though, the "big" script can call multiple instances of the little one. This is probably a silly thing to worry about, but it just seems sloppy to allow that.
    So I'm looking for a way to test whether the little palette is open. I don't think these ScriptUI windows show up in the app.panels array.
    The best I've come up with so far is:
    if (ntWindowShowing==undefined) {
        ntWindow.show();
        ntWindowShowing = true; }
    near the top of the little script, after the "ntWindow" palette is defined. Later, there's an onClose handler that sets ntWindowShowing to undefined. It seems to work OK, but I wonder if anyone has a better solution. I recall an admonition to avoid switching a variable from one data type to another but wonder if there's any harm in going from undefined to true to undefined again.

    Didn't exactly set off a debate over best practices. Oh well.
    I realized today that the if statement should be:
    if (typeof ntWindowShowing=="undefined")
    otherwise the script throws an error after a restart of the application. Seems to have something to do with the difference between an undeclared variable and an undefined one.

  • Restored our SSRS 2008 R2 from one server to another; Dates are in UK format and not US

    We have restored our SSRS 2008 R2 from one server to another. The original server was in US locale/culture. The new server was in UK locale/culture, when the restore happened. However it should have been in US locale/culture. We have made this change and
    new reports work OK.
    However existing reports (i.e. saved by a user) are still trying to use the US dates in a UK format and as a result throwing a date cant be below 1753 error.
    Has anyone seen this issue before or have any idea what we need to do to fix it?
    Thanks
    Kimberlad

     Hi Kimberlad
    Have you checked any changes in the Collation? 
    Please verify Reporting Server Databases and Server Collation is there any mismatch with your Source Server.
    and also please post complete Error message..
    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::

  • How to display the date from callender for more than one date format items

    i have one form which contains many date format items. i want to show the calendar and take the date from calendar.
    i am successfully show the calendar and take the date from calendar for one date item.
    my problem is i want to do same for all date format items in the form
    can any one help me?
    thanks

    Maybe you could provide more information.
    What calendar ? what item works ? what other don't ?
    is the issue in the different format masks ?
    Please elaborate more your situation.
    Francoisit is not the issue of different format masks.
    i created a block which name is jbeanblock. in this block item is bean. bean has one trigger when_custom_item_event.
    the code of this trigger is :
    DECLARE
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    LC$Date varchar2(256);
    LC$Day varchar2(256);
    LC$Month varchar2(256);
    LC$Year varchar2(256);
    v_date date;
    BEGIN
    IF (eventName='CALENDAR_EVENT') THEN
    eventValues := get_parameter_list(:system.custom_item_event_parameters);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_DATE',eventValueType, LC$Date);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_DAY',eventValueType, LC$Day);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_MONTH',eventValueType, LC$Month);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_YEAR',eventValueType, LC$Year);
    Clear_Message;
    select to_date(LC$Day||'/'||LC$Month||'/'||LC$Year,'dd/mm/yyyy') into v_date from dual;
    :ds_employee.hiredate:=v_date;
    synchronize ;
    END IF;
    END;
    hiredate is the item of the ds_employee table. hiredate has trigger when_new_item_instance. The code is
    Set_Custom_Property('JBEANBLOK.BEAN',1, 'SHOW_CALENDAR','50,50');
    ds_employee is my table name. which has 2 date items. one is hiredate and another is date_of_birth.
    for hiredate it is working. if i want to do same thing for date_of_birth also then how can we do?

Maybe you are looking for