How can I parse this date format?

Hey,
i am trying to write an interface between two applications. One application gives me the following date:
     Wed Jul 16 12:18:20 CEST 2003
but I need it to look like this:
     16.07.03 12.18:20
I tryed to use Date and DateFormat to parse and change it but the Date was unparseable.
I hope somebody can point me to the right direction or show me how I can do the formating.
Thanx a lot!
Martin

If this isn't a well-known date format, I can't see any solution but to write small function yourself which doe the job.
you can start with :
String source = "Wed Jul 16 12:18:20 CEST 2003";
String[] elements = source.split();//splits source around spaces
then you write functions that map day of week with numbers
"Mon" --> 1
"Tue" --> 2
etc...
it won't take you days to write this.
Sometimes it's faster to write the stuff yourself than spending days looking for something pre-defined that may or may not exist.

Similar Messages

  • How can i get this date format

    i want to convert my date format to
    YYMMDDHHMMSS
    so lets say
    select format_date (sysdate YYMMDDHHMMSS ) from dual
    out put
    090612040957
    help please
    Edited by: kama021 on Jun 13, 2009 9:05 AM
    Edited by: kama021 on Jun 13, 2009 9:06 AM

    Hi Kama, try these and spot the difference:
    MHO%xe>  select to_char(sysdate, 'YYMMDDHHMMSS') from dual
      2  /
    TO_CHAR(SYSD
    090613060625
    1 rij is geselecteerd.
    Verstreken: 00:00:01.21
    MHO%xe> --that was totally WRONG, use :
    MHO%xe> select to_char(sysdate, 'YYYYMMDDHHMISS') from dual
      2  /
    TO_CHAR(SYSDAT
    20090613060758
    1 rij is geselecteerd.
    edit
    Using 2 digits for century = soooooo 1970's....
    I suggest you read op on presenting dates here:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_sqltypes.htm#sthref442
    Edited by: hoek on Jun 13, 2009 6:10 PM

  • I connect my pendrive to macbook pro but it cannot detect and my important data is there in my pen drive so how can i collect this data from my pendrive?

    i connect my externalpendrive to macbook pro but it cannot detect and my important data is there in my pen drive so how can i collect this data from my pendrive?

    make sure that in your finder preferences you have it checked to show external drives on the desktop and in the sidebar of finder
    you find these preferences by selecting the finder icon (blue square on the dock w/ smiley face on it) then click on the work "finder" at top left corner of computer screen then click on preferences then general and put check next to show these items on the desktop and put check next to external drives
    now you should see it on the desktop if you still can't open the drive or access it, it may be in format the mac can't read or write to so that could be an issue.

  • How can we give the Data Format (File Type ) in Runtime

    Hi all,
    How can we give the Data Format (File Type ) in Runtime for the following method,
    cl_gui_frontend_services=>gui_download.
    Thanks in advance
    Sri

    There is a filetype parameter which you can set
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
    *    BIN_FILESIZE              =
        filename                  =
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      changing
        data_tab                  =
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24

  • How can I change the date format in Reminders and in Notes?

    How can I change the date format in both Notes and Reminders? Preference on Imac and Settings in IOS do not allow me to change the format in those 2 apps.
    I Like to see 10oct rather than 10/10, as an example.

    pierre
    I do not have Mavericks or iOS - but the first thing I would do is reset the defaults - I'll use Mavericks as an example
    From If the wrong date or time is displayed in some apps on your Mac - Apple Support
    OS X Yosemite and Mavericks
        Open System Preferences.
        From the View menu, choose Language & Region.
        Click the Advanced button.
        Click the Dates tab.
        Click the Restore Defaults button.
        Click the Times tab.
        Click the Restore Defaults button.
        Click OK.
        Quit the app where you were seeing incorrect dates or times displayed.
        Open the app again, and verify that the dates and times are now displayed correctly.
    Then customize to taste - OS X Mavericks: Customize formats to display dates, times, and more
    OS X Mavericks: Customize formats to display dates, times, and more
    Change the language and formats used to display dates, times, numbers, and currencies in Finder windows, Mail, and other apps. For example, if the region for your Mac is set to United States, but the format language is set to French, then dates in Finder windows and email messages appear in French.
        Choose Apple menu > System Preferences, then click Language & Region.
        Choose a geographic region from the Region pop-up menu, to use the region’s date, time, number, and currency formats.
        To customize the formats or change the language used to display them, click Advanced, then set options.
        In the General pane, you can choose the language to use for showing dates, times, and numbers, and set formats for numbers, currency, and measurements.
        In the Dates and Times panes, you can type in the Short, Medium, Long, and Full fields, and rearrange or delete elements. You can also drag new elements, such as Quarter or Milliseconds, into the fields.
        When you’re done customizing formats, click OK.
        The region name in Language & Region preferences now includes “Custom” to indicate you customized formats.
    To undo all of your changes for a region, choose the region again from the Region pop-up menu. To undo your changes only to advanced options, click Advanced, click the pane where you want to undo your changes, then click Restore Defaults.
    To change how time is shown in the menu bar, select the “Time format” checkbox in Language & Region preferences, or select the option in Date & Time preferences.
    Here's the result AppleScript i use to grab the " 'Short Date' ' + ' 'Short Time' "  to paste into download filenames - works good until I try to post it here - the colon " : " is a no-no but is fine in the Finder
    Looks like iOS Settings are a bit less robust
    - Date/Time formats are displayed according to 'tradition' of your region > http://help.apple.com/ipad/8/#/iPad245ed123
    buenos tardes
    ÇÇÇ

  • How can i change the date format mm/dd/yyyy to dd/mm/yyyy

    How can i change the date format mm/dd/yyyy to dd/mm/yyyy

    Date, time and currency formats are controlled via Settings > General > International > Region Format - you can't just change the date format

  • How can i convert this data(00000000) into date format(yyyy-MM-dd)

    Hi,
    i am using this method to convert date format from string.
    public static string FormatDate(string inputDate, string inputFormat)
                System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
                string datepresent = DateTime.Now.Date.ToString("yyyy-MM-dd");
                return datepresent;
    its working properly,
    but when input data is like 00000000 i am getting error this is not valid.
    how can i convert this into date format any help..!

    Have you tried the above code:
    I can see it is working with both Date and DateTime destination nodes.
    Map:
    Functoid Parameters:
    Functoid Script:
    public static string FormatDate(string inputDate, string inputFormat)
    string datepresent;
    if (inputDate == "00000000")
    datepresent = "0000-00-00";
    else
    System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
    datepresent = date.ToString("yyyy-MM-dd");
    return datepresent;
    Input:
    <ns0:InputDateString xmlns:ns0="http://DateFormat.SourceSchema">
    <DateString>00000000</DateString>
    </ns0:InputDateString>
    Output:
    <ns0:OutputDate xmlns:ns0="http://DateFormat.DestinationSchema">
    <Date>0000-00-00</Date>
    </ns0:OutputDate>
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful.

  • How can I change defaut date format to dd-mon-yyyy in bi analytics

    hi..
    How can I change the default date format to DD-MON-YYYY in BI Analytics...
    I am passing a date in a report from a prompt....but it is always taking "dd-mon-yyyy hh:mm:ss" format...I want to input the prompt in oracle's default date format i.e dd-mon-yyyy..
    please help...I dont want to use cast function because it will convert the date into a character value....I want a date...

    Hi USer
    Try this link
    How to change date format in OBIEE
    Re: repository variable at date prompt
    Thanks
    Diney

  • How can I modify the date format in Autoimporter?

    I am finding it impossible to get my iMac recognise my Canon SX200 camera and thus allow Picasa to import its pics.  Autoimporter, though, does see it and will create and populate a usefully date-named folder with them.
    Useful up to a point - Autoimporter's date is in the system's format (for me, dd-mm-yyyy) which does not allow the folders to fall naturally into date order in Picasa.  International date format (yyyy-mm-dd) would be ideal.
    Can anyone advice how Autoimporter's date format can be modified, please?
    Or tell how they got their Canon SX200 to be recognised by Picasa?

    I actually use a pretty manual solution for this with a few command line tools: ExifTool, bash, and AppleScript. It's fairly raw, but here's the process in case you're intereted.
    First, make sure ExifTool is working. Install it if needed.
    Create a bash script that moves the photos from your auto-import folder to yyyy-mm-dd folders.
    Here's a sample bash script:
    #!/bin/bash
    SOURCE_DIR=“/Users/yourusername/Pictures/Imported"
    DEST_DIR=“/Users/yourusername/Pictures"
    if [ -d $DEST_DIR ]; then
         for i in $( find $SOURCE_DIR -type f ) ; do
              mkdir -p $(exiftool -d $DEST_DIR/%y%y-%m%m-%d%d/ -p '$DateTimeOriginal' $i);
              mv -n $i $DEST_DIR/$(stat -t %y%y-%m%m-%d%d $i | awk '{print $12}' | sed s/\"//g )/;
         done
    fi
    Create an AppleScript file that calls the bash script, example:
    do shell script "~/bin/movephotos.sh”
    Then right-click the folder where you auto-import files, go to Services > Folder Actions Setup, and connect the bash script as an action for the folder.
    For more details, see http://designsimply.com/2013/12/30/moving-iphone-photos-with-autoimporter-exifto ol-bash-applescript/

  • How can I change the date format?

    How can I change the default date format for all date fields in Oracle CRM OD? Currently it is set to the US format of MM/DD/YYYY.
    I would like to spell out the month, e.g. October 6, 2010, in order to avoid confusion between US and international date formats.
    For example 11/6/2010 means October 6, 2010 in US but it means 11 June 2010 internationally. Having a global team, this is causing problems for us.
    Georgi

    Georgi, the company profile has a Default Locale. Also each user can have their Locale. The US format of MM/DD/YYYY can not be changed to October 6, 2010 as an example.
    I would recommend that you submit a enhancement request to CRM On Demand customer care.

  • How can I change the date format in a Numbers table?

    I have selected all of the cells in a date column, opened the Inspector and selected the Date & Time format, selected the date & month format butb the cell date does not conform to this format.  Instead I am getting the month, day, year, and time.
    Stu

    Stu,
    In order for Numbers to format the date it must already be a valid date.  If you post a screenshot we can see that the dat is valid.
    Make sure after you enter the date that the date ends up being right justified AUTOMATICALLY.  If the date is NOT valid, Numbers interprets it simply as text which it leaves left justified

  • I lost power to my MacBook Pro before I had saved anything that I was working on...usually I plug my computer it and power it back on and the documents pop right back up when the computer turns on. That did not happen this time.How can I recover this data

    I lost power to my MacBook Pro before I had saved anything that I was working on...usually I plug my computer it and power it back on and the documents pop right back up when the computer turns on. That did not happen this time. How can I recover my documents?

    If you never saved, auto save does not kick in.
    Peter

  • How can I change the date format to International (Europe, Asia, etc)?

    I am currently in Japan and would like to change my iPod's date format to an International format instead of the default American format. I have tried changing my mac's regional setting to Japan, UK, France and my iPod still displays the American date format. The interesting thing is that my mac correctly displays the date format in day-month-year format.
    I would be most grateful for any suggestions offered as I would like to get my iPod to correctly display the date. I had to manually set the iPod to the 24 hour clock. I am reasonably comfortable using the command line in a terminal.
    Message was edited by: PugetSounder

    Hi,
    This question is marked as answered but nothing shows as to the solution. Is there an answer?

  • On my 3GS, in Settings, under About, in Diagnostics and Usage, go into Data and see how gigantic the storage is. How can I delete this data? 5.0

    How do you delete the usage data in Diagnostics and Usage?
    It just keeps piling up. There is an option to send this data to Apple but I don't and have no intention of doing so.
    I just want to delete the data.
    How do I do this please?
    Thank-you.

    What I've done now is moved my music folder into a different folder to keep it safe, I've deleted my iTunes library, ie on itunes highlighted all and deleted. Then gone to iTunes media folder and checked they are deleted and they are. Now whatever done is put my music folder back and checked preferences and it says keep a copy of file in iTunes etc. also keep folder organised is on.
    So now I have started afresh I have both my music folder and iTunes folder which hold the same songs.
    So what do you recommend I should do to be able to delete the music folder and just have one folder of songs?
    Thank you

  • ITunes won't display current voice memos from my iPhone 4S. How can I tranfer this data without loosing it?, iTunes won't display current voice memos from my iPhone 4S. How can I tranfer this data without loosing it?

    Please help! My iTunes won't display my voice memos from iPhone 4S when trying to sync data. Files are to large for emailing. I want to back up the files on to my computer.

    JustinV72 wrote:
    How do I get the audiobook onto my iphone without erasing anything?
    You transfer the purchases to the computer you use to sync the iPhone.  You can use a thumb drive or an external HD, etc.  Read this: iTunes for Mac - How to copy purchases between computers:  http://support.apple.com/kb/HT1373

Maybe you are looking for

  • Mac Pro 2012 crashes regularly after loading Mavericks

    I upgraded the OS to Mavericks, direct from Lion, on my Mac Pro 2012 computer, since when it crashes and restarts spontaneously. Herewith the reports. Can anyone offer a straightforward solution? There is no sign of Google inspired crashes, as with o

  • ORA-28575: unable to open RPC connection to external procedure agent when trying to connect ORE.connect

    Hello, I had installed ore 1.3.1 windows server 2008 on top of Oracle DB 11.2.0.3 ,but when I connect the database,it didn't work. That is my code and error code. ore.connect(user = "rquser", sid = "db11g", host = "....", password = "....", all = TRU

  • Bridge CS6 und Photoshop CS6 Kontaktabzug II crash

    Ich kann weder in Bridge, noch in Photoshop CS6 mit Kontaktabzug II Kontaktbögen erstellen. Jedes Mal gibt es einen crash... Mac OS 10.9.5, CS6 File: /Applications/Adobe Photoshop CS6/Presets/Scripts/ContactSheetII.jsx    Line: 1272    Error Name: Er

  • Return url from action method?

    okay, I typically use 1. return "success" 2. or return "bad_login" 3. or etc. etc. I now have a situation where a service is telling me the url to direct too. In JSF, how can I send a redirect so the browser points to a new url(with attached paramete

  • How to make Dictation give me a new paragraph?

    I've learned how to make Dictation do most of the things I want as far as formatting, quotation marks, and capitalization goes, but it definitely does not work for me when I say "new line" or "new paragraph". It treats new line by leaving one space b