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.

Similar Messages

  • 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

  • I don't remember my security questions and I'm not in America now. I want to reset resurce email address but I can't have a phone call. Please send information from email, thank you.

    I don't remember my security questions and I'm not in America now. I want to reset resurce email address but I can't have a phone call. Please send information from email, thank you.
    <Email Edited by Host>

    The Three Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    A substitute for using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.
    These are user forums. You are not speaking to Apple here. You should not put a valid email address in a forum message.

  • IPhone wants to reset all data

    Pleas help.
    Hopefully someone can help me or I am really gonna be ticked off.
    My computer died on the weekend, which I have now reloaded. Loaded iTunes again (9.02), recreated my music library, added videos, added apps, added playlists and authourized.
    When I go to connect my iPhone, it naturally says it is synced with a different computer. It wants to delete all my apps which are loaded and their data. Some of the apps are used for business purposes and the information on them cannot be copied onto paper and re-entered into the app.
    Every app and song on the iPhone is now in iTunes.
    +Can I get the new iTunes to accept the old iPhone without wiping out any data on it???+
    All data is backed up, I just need iTunes to accept the iPhone.
    Thanks for the help.

    iphone 4 shut itself off and prompted me to connect to iTunes where is wants to reset my phone and lose all my data

  • How to generate the date in this format - "24-NOV-2002" ?

    i want to pass the date from java into oracle Date format. I have tried to use the SimpleDateFormat class in java. However, I could only get the following formats:
    1. "dd-mm-yyyy" --> "24-11-2002"
    2. "dd-MM-yyyy" --> "24-11-2002"
    3. "dd-MMM-yyyy" --> "24-NOVEMBER-2002"
    4. "dd-MMMMM-yyyy" --> "24-NOVEMBER-2002"
    How can i get the date format in "24-NOV-2002"?
    Thank you very much.

    3. "dd-MMM-yyyy" --> "24-NOVEMBER-2002"This should have given it to you as 24-Nov-2002 not 24-NOVEMBER-2002.
    If your only problem is the case I'd suggest using String.toUpperCase().
    E.G.
    Date dt = Calendar.getInstance().getTime();
    SimpleDateFormat fmt = new SimpleDateFormat("dd-MMM-yyyy");
    System.out.println(fmt.format(dt).toUpperCase());If you are trying to format the date for an SQL statement its a lot easier to use a PreparedStatement and setDate(...).
    Col

  • I want to have history my iphone 4s in 17/09/2012 Cant you help me please

    I want to have history my iphone 4s in 17/09/2012 Cant you help me please

    My daughter used to travel my phone fron 17,18 / 09/2012
    now it was not enough when pregnant 14-year-old
    I want to restore all of the data in the phone 2 days 17,18 / 09/2012 to find out who hurt my child
    Thanks you

  • I have a western digital external hard drive that needs to be re formatted for use on my but iMac but I do not want to lose existing data

    I have a Western Digital external hard drive that needs to be re formatted for use on my iMac, but I do not want to lose existing data, is this possible ?

    Formatting a disk always erases all the data on it. Your only option is to back it up elsewhere and restore it once formatted.

  • 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));

  • Issue with Saving the Query output data in Excel format

    Hi,
    Recnetly we had upgraded from 4.6c to ECC 6.0.
    In ECc 6.0 environment, when user try to export the query output , we are getting only XML option to save the data.
    But user want to save the data in EXcel format, he was able to do that in 4.6C.
    pleas eprovide some inputs, on this issue.
    Thanks,
    Sanketh.

    I cannot for the life of me imagine, why a link to a post in the 'Business One Forum' where one uses ODBC to transfer query-data to MicroSoft Excel is of relevance to the OPs question, even if the same is not a security issue.
    Never mind. [note 40155|https://service.sap.com/sap/support/notes/402155] deals with various symptoms in the ALV-Excel combination as as of release 4.6C. There are various others, mostly in components BC-SRV-ALV and BC-ABA-LI - also: I remember that when we upgraded from 4.5B to 4.7C there was an issue with Excel-templates -> the solution was in the release notes somewhere. So, in addition to SMP you might want to check the release notes and/or upgrade guide for solutions.
    And yes, moderators ... this is not a security issue, this should go to ECC-Applications/Upgrade.

  • How to set the Date and Currency Formats Based on Country

    Hi Friends,
    I am designing the one Global Form it will use for all countries.
    in that Form i want to print the date and currnecy Formats based on country.
    Like
    For US i want print the date and Currency Like This.
    Date -  MM/DD/YYYY
    Curremcy - XX,XXX,XX.XX
    For DE i want print the date and Currency Like This.
    Date -  DD.MM.YYYY
    Curremcy - XX.XXX.XX,XX
    Please suggest how i can control these things through Java Script or Formcalc....

    Hi Nitin,
    thanks For ur reply,
    i tried with this solution,
    But it is displaying the default Format like bellow formats.
    For short - mm/dd/yy
    For Medium - mmm dd , yyyy
    For Long     - thursday ,mmm dd , yyyy
    it was prinitng in above mentioned format,
    but here i want to print my own format for USA like MM/DD/YYYY.

  • Getting date and time format through RIDC call

    Hello,
    i want to set date and time features to my document , how can i get the date and time from RIDC call
    Regards
    Mayur Mitkari

    Hello
    I am performing this operation for getting date
    username = Util.getInstance().getCurrentUser().toString();
    IdcClient myIdcClient = Util.getInstance().getUCMConnection();
    IdcContext myIdcContext = new IdcContext(username);
    DataBinder binder = myIdcClient.createBinder();
    binder.putLocal("IdcService", "COLLECTION_GET_COLLECTIONS");
    binder.putLocal("hasCollectionID", "true");
    binder.putLocal("dCollectionID", parentNodeID);
    idcResponse = myIdcClient.sendRequest(myIdcContext, binder);
    DataBinder serverBinder = idcResponse.getResponseAsBinder();
    DataResultSet resultSet = serverBinder.getResultSet("COLLECTIONS");
    folderInfoList = new ArrayList<String>();
    resultInfoList = new ArrayList<List>();
    Iterator itr = resultSet.getRows().iterator();
    while (itr.hasNext())
    String dCreateDate = dataObject.get("dCreateDate").toString();
    but i am getting date in this format "2012-05-22 08:26:52Z"
    if i want the date in local timezone what can i do
    Regards
    Mayur Mitkari

  • Getting Source Data in Canonical Format

    All -
    I understand that in order to change the date format in xmlp we have to have the source data in the canonical format YYYY-MM-DDTHH:MI:SS
    My question is - How do I get my source data into this format? When I try to alter my session or do a to_char on a date column as follows:
    alter session set nls_date_format="yyyy-mm-ddThh24:mi:ss"
    or
    select to_char(sysdate,'yyyy-mm-ddThh:mi:ss') from dual;
    I get the message that the date format is not recognized. I'm sure that I'm just missing something simple, but any help that could be provided will be greatly appreciated.

    Hey BigD
    The XSD format is not recognized by the db ... Im chasing that up, they docs appear to say otherwise.
    You have some alternatives:
    1. If you are not bothered about the time portion you can just get the YYYY-MM-DD format and it will be formatted correctly by XMLP
    2. Use the Data Template engine from XMLP to get the data, it will format the date for you.
    3. Nasty but you could do something like:
    SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD')||'T'||to_char(sysdate,'HH24:MI:SS') from DUAL
    If/When I get an answer from the db team on any function I'll let you know.
    Regards, tim

  • Displaying data in readable format

    select *from user_tables;
    TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
    FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
    JOB_GRADES                     USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                    YES N          6          5            0          0          0           9                         0                   0          1          1     N ENABLED            6 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NO
    ERROR                          USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                    YES N          1          5            0          0          0          84                         0                   0          1          1     N ENABLED            1 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NO
    TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
    FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
    TEST_A                         USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                    YES N          3          5            0          0          0          16                         0                   0          1          1     N ENABLED            3 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NO
    COLLECTIONS_EG                 USERS                                                                                        VALID            10                     1        255          65536                       1  2147483645
                    YES N                                                                                                                             1          1     N ENABLED                        NO               N N NO  DEFAULT DISABLED NO  NO
    TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
    FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
                    DISABLED YES                                DISABLED DISABLED NO
    COUNTRIES                                                                                                                   VALID             0          0          0          0
                        N          4                                             0          19                         0                              1          1     N ENABLED            4 03-SEP-12 NO  IOT          N N NO          DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NO
    DEPARTMENTS                    EXAMPLE                                                                                      VALID            10                     1        255          65536                       1  2147483645
    TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS
    FREELIST_GROUPS LOG B   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE     INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
    DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS DRO
                    NO  N          8          5            0          0          0          19                         0                   0          1          1     N ENABLED            8 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NO
    EMPLOYEES                      EXAMPLE                                                                                      VALID            10                     1        255          65536                       1  2147483645
                    NO  N         20          5            0          0          0          66                         0                   0          1          1     N ENABLED           20 03-SEP-12 NO               N N NO  DEFAULT DISABLED YES NO
                    DISABLED YES                                DISABLED DISABLED NOi want to display the data in readable format
    10g oracle.

    Hi,
    Rahul_India wrote:
    i want to display the data in readable formatHow to do that depends on what you consider "readable".
    SET PAGESIZE higher, to get fewer header rows.
    SET LINESIZE higher, if appropriate
    Look up the COLUMN command in the SQL*Plus manual The
    FORMAT
    FOLD_AFTER, FOLD_BEFORE
    TRUNCATED, WRAPPED, WORD_WRAPPED
    options are especially useful.
    Do you really need to see all the columns? If not, don't use SELECT *.
    Consider explicitly listing the columns in a different order. The output may be more readable if related columns are listed together, or one directly above the other. At any rate, you can probably pack multi-line output more tightly if you specify the order.
    Do you have a text editor where reading long lines is easier than it is in the SQL*Plus window? If so, SPOOL the output, and read the file it creates in your editor.

  • I want to reset my bootcamp Windows 7 to factory setting. How would I do this without damaging or effecting my Mac data?

    I want to reset my bootcamp Windows 7 to factory setting. How would I do this without damaging or effecting my Mac data?

    If you want to erase the BootCamp Partition, you'd use the Bootcamp utility.
    Then that part of the Mac's hard disk drive may be available for use in OS X.
    {Or, if you want to install a clean Windows 7 in the same BootCamp partition
    you'd use the BootCamp utility to erase/install Windows in the same location.
    There is a BootCamp Support section in Apple Support online, and also there
    is a fairly OK ASC discussions area specific to that purpose. }
    But you may have to check to see if the partition map is correct for Mac OS X
    after you've used Bootcamp utility to remove Windows and the partition map.
    If you do not use the BootCamp utility to remove Windows, correctly or if a
    different method to install Windows was used, you'd have to move your Mac
    OS X system and applications off the computer to an external hard drive by
    use of a clone utility (carbon copy cloner, or superduper, etc) then use the
    OS X disk utility (from running clone, is easiest) to erase the computer's HD
    and then correctly partition map and format the hard drive for Mac OS X.
    At that point, the entire drive would be erased to reclaim any untouched
    partitions from alternative Windows utilities that were used, or not used in
    the time frame of proper opportunity.
    I've had a few Macs that had been partitioned for Windows and found one
    second hand MacBook to have more actual hard disk drive capacity than
    the previous owner and the Mac HD info suggested on first glance. About
    70% of the drive had been a Windows partition, but was invisible to OS X.
    So that turned out to be a lucky find, it was like installing a larger HDD.
    The wording of your question leaves a lot
    of important information out of the picture.
    Good luck!
    edited

  • I was given a 2010 17" MacBook Pro. I want to reset it to new and then migrate only SOME of my data from my older Mac Book Pro to the newer one. How?

    A friend gave me a 17" MacBook Pro used for only one project. (Lucky me) I want to reset/register the laptop as new and need to know how to do that.
    THEN...
    I need to migrate data from my older Macbook Pro to the newer one. I don't want to migrate all of the data. I have been moving data from one computer to another for 15 years and want to move only what is current and what I now need (Good-bye Quark files)--can I do that? How? Also, the older laptop is running Lion. The "new" one is running Leopard. Is that an issue? Do I need to upgrade the newer laptop to Lion first?
    Thanks.

    Install or Reinstall Lion from Scratch
    If possible backup your files to an external drive or second internal drive.
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Erase the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Erase tab in the DU main window.
    Set the format type to Mac OS Extended (Journaled.) Click on the Erase button and wait until the process has completed.
    Quit DU and return to the main menu.
    Reinstall Lion: Select Reinstall Lion and click on the Install button.
    Note: You can also re-download the Lion installer by opening the App Store application. Hold down the OPTION key and click on the Purchases icon in the toolbar. You should now see an active Install button to the right of your Lion purchase entry. There are situations in which this will not work. For example, if you are already booted into the Lion you originally purchased with your Apple ID or if an instance of the Lion installer is located anywhere on your computer.
    Unfortunately, Setup Assistant or Migration Assistant are set up to migrate your entire Home folder, third-party applcations and support files, and system preferences. If you use the Setup Assistant that opens the first time you boot Lion after installing, then you should migrate your Home folder, etc. This is the easiest way to do it.
    Once migration is finished you can delete what you don't want.

Maybe you are looking for

  • How to use iMovie files in Powerpoint on PC

    I have iMovie 11 and have created a movie that I would like to insert it into Powerpoint running on a PC (PP 2003 SP3).  I assume I need to do a file conversion but would like advice on the best way to do this. Thanks, Rick

  • How do I regain my App Purchases?

    My laptop went pop and I have recovered everything (although now on XP rather than Vista). However I made a small error and forgot to re-authorise iTunes before syncing the applications/library i had recovered with my Touch and not surprisingly it st

  • How can I install a prior version of Photoshop Elements?

    I own the CDs for Photoshop Elements 11, but have never installed it. How can I install PSE 11? I've loaded the serial numbers into my account, but I don't see any place to download PSE 11.

  • Environment Variables don't work after migrating zcm policy

    Hi There... I hope anyone can help me with this. After migrating my zcm policies to active directory I found my Environment Variables set in my login script do not work anymore. My guess is that somehow the Environment Variables in the login script a

  • FCP 4 files in FCE 4

    I have some old files that were made in Final Cut Pro 4. Will I be able to open and edit them in Final Cut Express ? Thanks for any info.