Date format - need this format --  04/04/2002 - need help?

Hi, I am trying to get the date into this format 04/04/2002, so I can insert into the database...
I have this code.. but it display it like this - Apr 4, 2002
Date t = new Date();
String today = DateFormat.getDateInstance().format(t)
Thx
Rich

Or because today is the 4th day of the 4th month maybe :
java.util.Date t = new java.util.Date();
java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("MM/dd/yyyy");
System.out.println(df.format(t));

Similar Messages

  • HOW TO FIX IT, GARAGE BAND FOUND  AUDIO FILES IN 8 BIT FORMAT. THIS FORMAT IS UNSUPPORTED AND CANNOT BE PLAYED

    HOW TO FIX IT, GARAGE BAND FOUND  AUDIO FILES IN 8 BIT FORMAT. THIS FORMAT IS UNSUPPORTED AND CANNOT BE PLAYED

    Hi..
    Post your topic in the GarageBand community >  GarageBand for Mac: iLife: Apple Support Communities
    More GB users will see your post there.

  • I upgraded to lion and now iPhoto just hangs, I tried clearing out all content but still same I need this app for my business please help

    I upgraded to Lion and now iphoto hangs ( I have an intel imac 4gb 2.66 ghz). Tried wiping all content but no change , maybe third party plugin? But how do I know which one? Better question is: is there a known plugin causing trouble?

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists.
    If you can't create and open a new, test library make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    If you can create and use a new library the problem lies with your current library.  In that case make a temporary, backup copy (select the library and type Command+D) and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • With in smart forms   i need time format like 12:26:37

    hi,
    in smart forms time format is coming to one variable time in this format 122637, but i need this format  12:26:37
    plz tell me the answer.
    thanks.

    Hi
    Check this:
    REPORT  ztest_time_conv.
    DATA: hour(2) TYPE n,
          min(2) TYPE n,
          sec(2) TYPE n,
          tim TYPE i.
    DATA: time TYPE p DECIMALS 2.
    DATA: timeformat TYPE sy-uzeit.
    time = '1.38'.
    tim = time * 3600.
    hour = tim DIV 3600.
    tim = tim MOD 3600.
    min = tim DIV 60.
    sec = tim MOD 60.
    CONCATENATE hour min sec INTO timeformat.
    WRITE timeformat.
    BREAK-POINT.
    PS:Code given by Vijay Babu Dudla in other thread..in ABAP general..when I pasted the link,it did not work..so I am giving it here like this.
    Regards,
    VIshwa.
    Edited by: Vishwa Sri Hari on Nov 5, 2008 1:01 PM

  • Report is executing in background and need data(output) in excel format

    Report is executing in background and need data(output) to get downloaded in excel format in my PC from an internal table;;in any drive i.e. C: or D: .When executing in backround it prompt to user with which location excel file to be saved and the name of file.How to download in background in excel format?
    Edited by: PRASHANT BHATNAGAR on Aug 26, 2008 6:24 AM

    Hi
    Download a report to excel with format (border, color cell, etc)
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Regards
    Murali Papana

  • Date should be in this format DD-MON-YYYY  HH:MI:SS

    Hi All,
    I am having a column date data type ,in that i am using SYSDATE and formating as DD-MON-YYYY HH:MI:SS but result iam not getting in this format,any one please help me regarding this..
    Thanks in Advance..
    Edited by: 30021986 on Oct 14, 2012 1:38 PM
    Edited by: 30021986 on Oct 14, 2012 3:38 PM

    there is a misunderstanding.
    Your database column is in a DATE type. This is a type, and thanks to this type, you can DISPLAY the date in various ways in a query editor (toad, sql developer...).
    I mean, there is no various physical Date type columns, but only one called "date".
    If you want to display this date in the way "DD-MON-YYYY HH:MI:SS", then convert it into "CHAR" (or VARCHAR) type with the function TO_CHAR (in oracle).
    Example : to_char(sysdate, 'DD-MMMM-YYYY HH24:MI:SS").
    But the result will be an alphanumeric type. You won't be able to do further operation on date, like adding a day for instance.
    That's why you should keep the date format in the column of your database table, but convert it in your queries.
    If you really need to have this specified format, then use the char or varchar type in your database table.

  • I need to format my laptop. How can I save Lightroom data?

    Hi
    My windows 7 laptop needs formatting (total wipe) and I would like to save the lightroom data. Is this possible? Or do I just copy the latest backup and open it when all is newly installed?
    Thanks,
    J

    Yes it is!
    A little background first:
    Think of the structure of Lightroom as being in three parts.
    First is the application itself.
    Second is the catalog and ancillary files like presets and previews, keywords and templates.
    Third is your image collection.
    If you wipe the application you will need the serial number for the re-install.
    If you are using Lightroom 4.x or earlier you will also need a copy of the application install file.
    If you are using Lightroom 5.x then you can, if needed, just download the file from Adobe.
    The catalog and all the ancillary files should be in a folder called Lightroom.
    Copy this entire folder to a large external hard drive that is big enough to contain this folder and all your images.
    Copy the images in exactly the same pattern as they currently exist on the internal drive.
    The idea is to be able to copy those images, in their folders, back onto the internal drive when everything is shipshape.
    Once you have cleaned up your system and re-installed the OS and then Lightroom then copy the catalog folder back to wherever you want it.
    Then copy the images back to the internal hard drive - you may be able to put them back where they were and so Lightroom will actually be able to find them again.
    If they end up in a different location it is still not an issue.
    (See below.)
    Launch Lightroom for the first time by navigating to your catalog and double-clicking on it.
    This step ensures that your usual catalog launches.
    If you launch the catalog in the usual way Lightroom will want to create and launch a new catalog.
    With Lightroom open in the Library module go and check out the Folders subpanel on the left.
    It is likely that folders and images are displaying question marks.
    Go to the highest folder in the image hierarchy and R-click on it.
    A dialog box opens that invites one to navigate to that folder.
    Once you have done that all the images should automatically reconnect with the catalog.
    Tony Jay

  • Do we need to format data and log files with 64k cluster size for sql server 2012?

    Do we need to format data and log files with 64k cluster size for sql server 2012?
    Does this best practice still applies to sql server 2012 & 2014?

    Yes.  The extent size of SQL Server data files, and the max log block size have not changed with the new versions, so the guidance should remain the same.
    Microsoft SQL Server Storage Engine PM

  • Date format and number format- need help

    Hi everyone,
    I'm working with JDeveloper10.1.2, struts and uix pages.
    I have 2 problems:
    1 - I have a field of type date in my uix page and the format is like this='24-Jun-2006', but I need to change this format to be '2006/06/24'.
    2 - I have an attribute of type number(salary) and when I drag and drop this attribute from the DataControl Pallete and run the project, in the uix page I see a number, for example: salary = '123456', but I should see salary = '123.456,00'.
    And when I write, for example '123.456,00', when I commit this value, I should see in my DataBase something like this '123456,00'.
    I alredy tried to change the attribute properties in the Entity Object but without success. :(
    Can anyone help me with this problems?
    Thanks,
    Atena
    Message was edited by:
    Atena

    nd when I write, for example '123.456,00', when I
    commit this value, I should see in my DataBase
    something like this '123456,00'.Sorry I replied before thinking about the problem. You will not see the value in the db as such, the db will show the values differently depending on the session settings.
    The values will only show up as such in the form. To see them such in the db do:
    alter session set nls_date_format='yyyy.mm.dd'
    for the date and
    alter session set nld_number_format='0.00'
    for the number

  • Need datetime in this format "Tue, 5 Feb 2008 15:31:20 +0100"

    Hi,
    i have to export Date and Time to a string in this format:
    "Tue, 5 Feb 2008 15:31:20 +0100"
    DayByName, DayByNumber Month Year HH:MM:SS Timezone
    Thanks for help.

    Ok, i did it like you told me.
    * Get Day by number
      CASE sy-fdayw.
        WHEN 1.
          v_day = 'Mon'.
        WHEN 2.
          v_day = 'Tue'.
        WHEN 3.
          v_day = 'Wed'.
        WHEN 4.
          v_day = 'Thu'.
        WHEN 5.
          v_day = 'Fri'.
        WHEN 6.
          v_day = 'Sat'.
        WHEN 7.
          v_day = 'Sun'.
      ENDCASE.
    * Get Name of month
      CASE sy-datum+4(2).
        WHEN 01.
          v_month = 'Jan'.
        WHEN 02.
          v_month = 'Feb'.
        WHEN 03.
          v_month = 'Mar'.
        WHEN 04.
          v_month = 'Apr'.
        WHEN 05.
          v_month = 'May'.
        WHEN 06.
          v_month = 'Jun'.
        WHEN 07.
          v_month = 'Jul'.
        WHEN 08.
          v_month = 'Aug'.
        WHEN 09.
          v_month = 'Sep'.
        WHEN 10.
          v_month = 'Oct'.
        WHEN 11.
          v_month = 'Nov'.
        WHEN 12.
          v_month = 'Dec'.
      ENDCASE.
    * Build Date, Time string in RSS-valid format
      CALL FUNCTION 'GET_SYSTEM_TIMEZONE'
        IMPORTING
          timezone = v_tzone.
      CONCATENATE v_day ', ' sy-datum+6(2) ' ' v_month ' '
      sy-datum+0(4) ' ' sy-uzeit(2) ':' sy-uzeit+2(2) ':' sy-uzeit+4(2) ' +'
      v_tzone INTO l_datetime RESPECTING BLANKS.
    My result is "Mon, 11 Feb 2008 12:36:41 +CET" but i wan't "Mon, 11 Feb 2008 12:36:41 +0100".
    Maybe i need something like UTC with deviation?! UTC+1 for example and resolve numeric expression of it?
    Thanks,
    Stefan
    Edited by: Stefan Becker on Feb 11, 2008 12:40 PM

  • I want to reset my date to this format: 12/31/2012 11:59:59 PM .. please ad

    I want to reset my date to this format: 12/31/2012 11:59:59 PM - see code below:
    DECLARE
    v_latest_close DATE;
    BEGIN
    v_latest_close := TO_DATE ('12/31/2012 23:59:59 ','MM/DD/YYYY HH24:MI:SS');
    DBMS_OUTPUT.PUT_LINE('The new date format is : '|| v_latest_close);
    END;
    the code above displays only : 12/31/2012 instead of 12/31/2012 11:59:59 PM
    Please advise
    Hope

    Hi 976253,
    Try this... and NO need to change the variable from DATE to TIMESTAMP.
    Here,
    'v_latest_close' had the string '12/31/2012 23:59:59' converted into DATE format (using TO_DATE).
    But, DATE even though internally is stored in different way, when displayed it gets formatted as per your NLS settings.
    So, just for sake of display, we used TO_CHAR with the desired Format String.
    DECLARE
    v_latest_close DATE;
    BEGIN
    v_latest_close := TO_DATE ('12/31/2012 23:59:59 ','MM/DD/YYYY HH24:MI:SS');
    DBMS_OUTPUT.PUT_LINE('The new date format is : '|| to_char(v_latest_close,'mm/dd/yyyy hh12:mi:ss AM'));
    END;gives
    The new date format is : 12/31/2012 11:59:59 PM@OraFighter -
    TIMESTAMP is needed to hold 'extra' DATE attributes like - Fractional Seconds, TIMEZONE, etc.
    In this case, DATE will suffice. It internally stores the 'Time' details and only is matter of display using TO_CHAR.
    Hope that Helps,
    Ranit B.

  • How can i get Date in this format - 04/Feb/2008

    I need to get the date in this format - 04.Feb/2008. How can i get it using Java coding..
    java.sql.date
    Please reply to this..

    Hi,
    Are you running this code in a java file which is running on your local system???
    Is this is webapp/webdynpro???
    If this is a web app/webdynpro and if its deployed on the server, it should take the time of the system(server) where the app is deployed.
    Regards
    Ayyapparaj

  • HT1320 how can i save me data stored on a non responding ipod classic and says you need to format before using it?

    how can i save me data stored on a non responding ipod classic and says you need to format before using it?
    in another way : how can i save my date stored on my classic iPOD as a external hard .... when that msgs appears .... volume doesn't contain a recognized file system , make sure the file system is loaded .... then , you need to format ??? can anyone help ?

    It sounds like the iPod's storage has data corruption.  You may be able to treat it like an external drive and use data recovery software on it, but it probably won't work because the system is telling you that the drive needs to be formatted before it is recognized.
    If the problem is data corruption and there is no hardware-related problem on the iPod's hard drive, a Restore should fix the problem.  But this will obviously erase the iPod's hard drive.

  • HT3275 I need to use a Western Digital external drive on both my Mac and a PC.  To do this I need to format the drive in FAT 32.  However, Time Machine won't recognize this format.  Is there a work-around?

    I need to use my external drive on my Mac and a PC, so I formatted it in FAT 32.  I found that Time Machine doesn't recognize this format and cannot back up to it.  So, if I want to use Time Machine I need to go back to a Mac format.  Is there any way to get Time Machine to save onto a FAT 32 formatted drive?

    It's usually not a good idea to use a Time Machine drive for anything else. It's too easy to make mistakes, or not do regular backups, or run out of space.  See Time Machine - Frequently Asked Questions #1 and 3.
    But you can create a second partition on the drive, for use with Windoze.
    See #5 in the FAQ for formatting instructions.  You'll need to select 2 partitions.  It's usually best to put the Time Machine partition first, and it should have the Mac OS Extended (Journaled) Format.  Make the second one MS-DOS (FAT), although you might prefer ExFAT.
    Be sure to specify the GUID Partition table.

  • HT3775 unable to get quicktime movies to play on my imac. This is the error message I always get. "The document "4-20130701090400-5.mp4" could not be opened. The movie is not in a format that QuickTime Player understands.You may need to install additional

    Unable to get Quick time movies to play on my imac. This is the error message I allways get.
    "The document “4-20130701090400-7.mp4” could not be opened. The movie is not in a format that QuickTime Player understands.You may need to install additional software to open this type of file."

    Download and install VLC Player. It plays more formats and is free and highly regarded.
    http://vlc-media-player.en.softonic.com/mac
    Cheers
    Pete

Maybe you are looking for

  • Using MDT to re-join computers to a domain after a re-image

    Since 2010 we have been using WDS to build, capture and deploy our image across our organisation (A High School) which has worked well enough. While WDS can do all this the build and capture is a little clunky and relies on you to manually installing

  • Need to create 500 designs, all identical in every way except for a unique QR code

    Hi there. I am using Photoshop CS6. I have a design from which I want to create 500 versions of an image. All will be identical, except for the QR code which will be unique for every one. The placement of the QR code will be identical in all of them.

  • Set up airport to access connected macs through VNC

    Hi, I want to access the Macs on my wireless network remotely using Vine VNC software. The Macs are getting IPs from my airport. The Airport is connected to a DSL modem. Can someone walk me through the steps to map my outside IP address to the laptop

  • Take ownership of a registry key, and change permissions

    Hello, I am writing a powershell script to configure a W2008-R2 Server. In one of the steps, I need to take ownership of an existing registry key, and then give full control permissions to the administrators. I have done this: $acl = Get-Acl $key $me

  • Cost planning decision

    hi, Actually in PS we have diff types og Costplanning. How can we decide this COST PLANNING will be suit for this business,any inputs.