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.

Similar Messages

  • Change DateTime format property to DateTime

    Hi,
    I have a DateTime field in  contenttype. 
    Field was set to DateOnly Format but user wants it to be as DateTime field. As it is already in live I have written a Feature upgrade reciever to update all the existing field. After Solution and feature upgrade its working fine for the new items but not
    to the existing files. I tried by updating the list field directly but the changes does not replicate in Edit/Display forms of an items.
    I have checked through Sharepoint Manager and the format DateTime.
    How can i change the DateOnly format to DateTime in existing list.
    Thanks

    Hi Mohammed,
    According to your description, my understanding is that you want to change the Date only field to Date Time in existing fields in SharePoint.
    I recommend to edit the date column in the browser directly.
    Please go to the List settings in the list where the content type is used and then click the date field under Columns. After that you can edit the date field to Date and Time format and all the existing fields will be updated with 12:00 AM value with the
    date value.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Do I have to change the format of my canon video footage in order to import

    the format of some video footage that I recorded is currently .MOD and some are .MOI (I have no clue what that means, but that's what it says.. and I'm assuming it needs to be converted into another file-type)
    my macbook pro can't recognize this format, so is there anyway I can change the format of these videos so I can edit it in imovie?
    [I have a MacBook Pro and the footage is from a Canon FS100]
    Thank you!

    The MOD files are MPEG-2 video formats recorded on tapeless media. Use MPEG Streamclip to convert them to Apple Intermediate Codec for editing in iMovie. The MOI files do not contain video; they are basically information files associated with the video files. MPEG Streamclip is free however you will also need to get the Apple MPEG2 Playback Component ($20 from the apple store) if you don't already have it on your MBP.

  • How to Change the Format of Object.................

    Hi,
    The client is asking us to change the format of the out of th object into another format.
    With The existing format the result is DisplayFare: 4,673.23
    and the formula used is :
    WhilePrintingRecords;
    global currencyvar DisplayFare;
    global currencyvar array PaxFare;
    global numbervar num;
    if {fld.Fld1}= 'IPAX' then
        DisplayFare := PaxFare[num];
    DisplayFare;
    But client want the same in different format DisplayFare:4 673,22.
    For what changes i needs to do...................please do the needful.
    Regards,
    Maheedhar

    Hi Maheedhar,
    The only difference I see if that the required format does not have a thousands separator (Or does it have space as the separator?) and it uses a comma as the decimal separator.
    You can right-click the field > Format Field > Customize > In here you should be able to change the Decimal separator, Thousands separator etc.
    -Abhilash

  • How can I change the format of some of the pages of a PDF-document?

    I use Adobe Acrobat and have a PDF-document with A4 pages and some pages of another format (half of an A4).
    How can I change the format of these pages to A4 (with a lower blanc part)?

    You can increase the page size with the Crop Tool of Acrobat Pro.

  • Change Output format of standard program RFSZIS00

    Hi All,
    I want to change output format of standard program RFSZIS00 for this i copied this into Z program but i am not able to
    find out where final output table is populating because that program is not using any final internal table it's using EXRACT and
    another thing is all discription for field has given in German Language.
    It's a clasical report not an ALV.
    Edited by: Raj Singh on Jul 3, 2009 11:03 AM

    Dear Raj,
    as per the report mentioned by you, it is calling some subroutine to display the details.
    Just try to trace the WRITE statements and check if you can add your own include in this report to display the output as per your requirement.
    Regds,
    Anil

  • How to change file formats i.e from jpeg to png etc

    currently i have requirement where i need to do following processiing
    first i have to check media type
    is it image,audio or video??
    if image is not in the png format then i have to change that image from other format to .png file
    eg from jpeg to png
    similarly i have requirement for changing video of any type to .3gp format
    if file type is audio then i have to change it to .midi format
    can any one provide me help for that ??
    is it possible in java to do this kind of thing ????

    is it possible in java to do this kind of thing????
    You can't just generically go from one format to
    another.
    If you have specific set of acceptable image formats
    and video formats you can sit down and plan how to do
    it in Java.
    There are many formats that you can convert using
    Java but not all possible formats.can you give me any hint or code to do how to change media formats from one format to another

  • How do I change pdf format of scans to jpeg?

    I scan photos into pdf, but when I try to send them, the recipient wants jpeg. How do I change pdf photos to jpeg?

    First all the data on the drive needs to be removed and the storage drive disconnected.
    Then the computer booted from another boot drive (if changing the orignal boot drive)
    Then head to Disk Utility and select the entire drive (makers name and size on the left) and click the Parittion Tab to change the format.
    Option: GUID Format: OS X Extended Journaled is usally the best Mac format for the entire drive.
    If you wish to change the format of just one partiton on the drive, then select that instead and just change the format, not the partition map.
    If you need other formats for working with Windows then see this. (or learn more about drives and formatting)
    Drives, partitions, formatting w/Mac's + PC's

  • How to change the format of a picture?

    I've saved a picture that I got from Twitter. The end of the picture file says ".jpg-large".
    This file will not open in Preview, nor in iPhoto which are the two apps where I knew how to change the format.
    Could anybody help me out in another method of changing this picture format?
    Thank you

    Rename it to end in .jpg.
    (77789)

  • BCS Datetime format to date only format in external list

    Hi ,
    Version: SharePoint Online 365
    I am having Date Field in DB . While i am retrieving in BCS Its showing as Datetime Format.
    How can trim Time Value. I need to display in Date Format only .
    How can i change? Please give me suggestions!!!
    Regards
    Vidhya

    Hi Vidhya,
    Try to format the date in the BCS External content Type, Please go through following link for further reference:
    http://blogs.msdn.com/b/bcs/archive/2010/02/11/working-with-complex-data-types-in-business-connectivity-services.aspx
    http://msdn.microsoft.com/en-us/library/gg271157.aspx
    Please don't forget to 'mark answer/propose answer' or 'vote as helpful' as appropriate.

  • Changing Calendar Format

    Hello,
    Everybody.
    I am beginner to HTMLDB.
    In my project I want to change the format of calendar like as follows,
    Date 1 2 3 4 5 6 7
    Day Sun Mon Tue Wed Thu Fri Sat
    Column x y z a b c d
    Please help me.
    Thanks,
    Sumanth.

    It works for me on Windows 7.
    DateTime widget is based on Windows' Calendar control, I guess.
    Japanese Imperial Calendar is supported from Java6 but it is not related to SWT.
    >Locale localeImperialJapanese = new Locale("ja", "JP", "JP");
    >Locale.setDefault(localeImperialJapanese);
    This has no sense for the DateTime widget.
    attached: settings and the result of Snippet250.

  • Changing the format?

    How do you change the format of your pictures in iPhoto from jpeg to anything else? Do I have to open them up in another program to do that, and if so, what program? Is there something I can download? Thanks!

    Emma*:
    Welcome to the Apple Discussions. You can change the format by using the File->Export->File Export menu option. There you can select on of several formats, resize the file if desired and then export to a folder on the Desktop.
    Do you Twango?

  • How do I change the format of my 5th Generation iPod from Windows to Mac

    How do I change the format of my 5th Gen iPod from a Windows format to the Mac?

    But this will delete all the songs I have? I have a lot of them on my iPod classic
    Yes.
    I want to transfer (well copy) all my songs from the iPod to itunes on the mac - and then have the itunes library as being placed on the external drive. The last part I think I know, but I can't work out how to copy music from my iPod
    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    Then see here about backing your iTunes library onto an external hard drive.
    iTunes: Back up your iTunes library by copying to an external hard drive
    B-rock

  • Adding a country to the Change Address Format menu

    I have someone who I wish to write to in Turkmenistan, so I'm using Address Book to create a label for him. However, Turkmenistan (like many other countries) is not listed on the menu of countries you can change the Address Format to on the Edit/Change Address Format submenu, when you click on the address type (home, work, etc).
    Is there a way to add countries, or perhaps to specify Other/Not Listed and just use a single blank field to type in the address? When I try and enter a Turkmenistan address according to the USA label format, it looks misaligned and has a gap between the second to last and last lines of the address.
    I've searched the forums and all the documentation already, but I can find nothing on this. Please help if you can!

    This is what I was doing initially, but for some strange reason, when I paste the Cyrillic in from another document (as I cannot type it myself), the second line of the address gets shifted all the way to the left, outside of the actual editing field. I can't edit it or make it align properly at all, and it looks that way even on the saved Card. I think on the label, it looks fine, but I can't delete the City, State fields, so there's a gap between the major bulk of the address and the country.
    It would be nice if there were a way to say what fields you want on a card- for example, drag and drop Street, or Address Line 1, Address Line 2, and delete fields you don't want- like State/Province. (This would negate the need of needing to pick a country's particular format, because you could rearrange it as you pleased, or as was proper for wherever you were writing). I'm just wondering if there's some way to do something to help me-- maybe change something in one of the plist files, or AppleScript? (Though I'd rather an easier solution, if I can get it done, that would be great.)

  • In Numbers, how can you change the format of a cell on ipad mini?

    I used the paintbrush but the changes are not taking on the ipad mini but it keeps going back to the 'automatic' default.

    Hi Dempb,
    One of the ways this can happen is if the cells you are trying to format are the result of a formula or coming from elswhere in the table. For instance, if I have the formula SUM that is totaling a column formated "currency" I will not be able to change its format to "text".
    What do you want to do? there may be another way to accomplish it.
    Quinn

Maybe you are looking for