Change YEAR in date column

Ok,
I have column Event_Time DATE type. It holds this type of values: '21.04.*0010* 10:59:30'
Now I don't want to change anything except YEAR. I want to replace '0010' with '2010'.
What is the easiest way to do it?
thx

Maybe something like this? (Note this is not tested):
UPDATE  <table>
SET     event_time = TO_DATE('2010' || TO_CHAR(event_time,'MMDDHH24MISS'),'YYYYMMDDHH24MISS')
WHERE   TO_CHAR(event_time,'YYYY') = '0010'
;

Similar Messages

  • Want to change backgroung of Date Column

    Hi Guys,
    I want to change background of Date Column of table but condition is if date is greater than today then it should be in Red otherwise no.Do i need to do this from beam ?
    Thanks,
    Raul

    Have a look at this:
    http://andrejusb.blogspot.ie/2010/04/changed-row-highlighting-in-oracle-adf.html
    http://www.techartifact.com/blogs/2009/05/conditionally-colouring-of-row-cell-in-adf.html
    or
    1. You can create a transient column to your VO with built in Groovy expressions like adf.currentDate.
    2. and compare with you date column and change inlinestyle like #{row.myDate > row.currentDate ? 'background-color:red' : 'background-color:blue'}
    Edited by: Lalit S on 7 Jun, 2013 10:59 AM

  • How to get Week,Month and Year details from a date column

    Hi frenz,
    I've a column like tran_date which is a date column..... I need the next week details based on this column and so on...
    I need month and year details as well based on this tran_date column.... can any one tell me how...
    Thanks in advance

    My example for objects:
    create or replace type date_object as object
      centure number,
      year    number,
      month   number,
      day     number,
      hour    number,
      minute  number,
      second  number,
      daypart number,
      week    number,
      constructor function date_object(p_dt date)
        return SELF as result
    create or replace type body date_object is
      constructor function date_object(p_dt date)
        return SELF as result
      as
      begin
        SELF.centure:= trunc(to_char(p_dt,'YYYY')/100);
        SELF.year:=    to_char(p_dt,'YYYY');
        SELF.month:=   to_char(p_dt,'MM');
        SELF.day:=     to_char(p_dt,'DD');
        SELF.hour:=    to_char(p_dt,'HH24');
        SELF.minute:=  to_char(p_dt,'MI');
        SELF.second:=  to_char(p_dt,'SS');
        SELF.daypart:= p_dt-trunc(p_dt,'DD');
        SELF.week:=    to_char(p_dt,'IW');
        return;
      end;
    end;
    select date_object(sysdate),
           date_object(sysdate).year
    from dual;Regards,
    Sayan M.

  • Change in start date of tax depreciation not for posting in mid of year

    Hi Experts,
    Tax depreciation area is not for posting. The fiscal year is from Jan to Dec. I want to calculate tax depreciation from May 2011 based on Net Book Value of tax depreciation as on 30.04.2011. But once I change the start date of tax depreciation in asset master to 01.05.2011, the system ignores the previous depreciation so I am not getting the NBV of tax depreciation of 30.04.2011.
    Is any setting is required to get this. I can not do changes in posting rules since this tax depreciation is not for posting any thing.
    The fiscal year 2010 is closed and NBV of tax depreciation as on 31.12.2010 of one asset is 80000, If I change the start date of tax depreciation from 1.1.2011 then system correcly take NBV of 31.12.2010 for further depreciation calculation. But if i change the start date of depreciation in between of year the system is calculating depreciation based on NBV of 31.12.2010 but ignores the tax depreciation from 1.1.2011 to 30.04.2011, which I previously run using AFAB.
    Need your assistance to know is it feasible to do this.
    Thanks and Regards,
    Harshad

    Hi Harshad
    The behaviour of the system is very much correct, it is designed to behave that way...
    One, you should not have changed the dep start date....
    two, NBV in SAP is always taken to be NBV @ the start of the year....
    The best wayout I can suggest here is, if you are on EhP4 and EA-FIN active
    a. Change the Dep Key in the asset... You can maintain Time Dependant Dep Terms in asset master i.e. Dep Key X from Jan-Apr and Dep Key Y from MAy onwards
    b. This will however, calculate dep based on NBV at the start of the year, but based on new useful life
    c. Considering your eg: The system is posting more depreciation i.e. 5333 instead of 5155.... So, calculate this amount outside the system and post a Manual Write up ABZU inorder to reduce the Dep and increase the NBV
    Even if you are on not on EhP4, you can follow the same approach as above.... i.e.
    a. Change the Dep Key in asset master.... This will throw up new dep figure, on the basis of New Useful life and NBV at the start of the year
    b. Post a write up from ABZU....
    No need to do Asset to asset transfer in my opinion
    Only diff between EhP4 and Non EhP4 is that the differential depreciation would be lesser if you are on EhP4... i.e. instead of 5333 now, system may throw up depreciation amount of 5666.. So, you may need to post write up of 5666-5155
    br, Ajay M

  • Change in start date of tax depreciation in mid of year

    Hi Experts,
    Tax depreciation area is not for posting. The fiscal year is from Jan to Dec. I want to calculate tax depreciation from May 2011 based on Net Book Value of tax depreciation as on 30.04.2011. But once I change the start date of tax depreciation in asset master to 01.05.2011, the system ignores the previous depreciation so I am not getting the NBV of tax depreciation of 30.04.2011.
    Is any setting is required to get this. I can not do changes in posting rules since this tax depreciation is not for posting any thing.
    The fiscal year 2010 is closed and NBV of tax depreciation as on 31.12.2010 of one asset is 80000, If I change the start date of tax depreciation from 1.1.2011 then system correcly take NBV of 31.12.2010 for further depreciation calculation. But if i change the start date of depreciation in between of year the system is calculating depreciation based on NBV of 31.12.2010 but ignores the tax depreciation from 1.1.2011 to 30.04.2011, which I previously run using AFAB.
    Need your assistance to know is it feasible to do this.
    Thanks and Regards,
    Harshad

    Hi Harshad
    The behaviour of the system is very much correct, it is designed to behave that way...
    One, you should not have changed the dep start date....
    two, NBV in SAP is always taken to be NBV @ the start of the year....
    The best wayout I can suggest here is, if you are on EhP4 and EA-FIN active
    a. Change the Dep Key in the asset... You can maintain Time Dependant Dep Terms in asset master i.e. Dep Key X from Jan-Apr and Dep Key Y from MAy onwards
    b. This will however, calculate dep based on NBV at the start of the year, but based on new useful life
    c. Considering your eg: The system is posting more depreciation i.e. 5333 instead of 5155.... So, calculate this amount outside the system and post a Manual Write up ABZU inorder to reduce the Dep and increase the NBV
    Even if you are on not on EhP4, you can follow the same approach as above.... i.e.
    a. Change the Dep Key in asset master.... This will throw up new dep figure, on the basis of New Useful life and NBV at the start of the year
    b. Post a write up from ABZU....
    No need to do Asset to asset transfer in my opinion
    Only diff between EhP4 and Non EhP4 is that the differential depreciation would be lesser if you are on EhP4... i.e. instead of 5333 now, system may throw up depreciation amount of 5666.. So, you may need to post write up of 5666-5155
    br, Ajay M

  • How can i change the Format of my DATE column?

    I need to change the date format for a whole column. At present i can do MM-DD-YYYY. I need to change this this to DD-MMM-YYYY.
    I know about the to_date function, i tried to apply it to change the format of my whole column by doing the following.....
    CREATE TABLE "IT220_DATEHOLIDAY"
    "DEPARTID" VarChar(2)NOT NULL ENABLE,
    "HOLCODE" VARCHAR2(2)NOT NULL ENABLE,
    "DEPARDATE" DATE,
    to_date('DATE','DD-MMM-YYYY'), <<<change DATE column to DD-MMM-YYYY
    CONSTRAINT "DATEHOLIDAY_PK" PRIMARY KEY ("DEPARTID") ENABLE
    ORA-00902: invalid datatype <<<<This was the error message i received.
    I am aware that the to_date function is supposed to be used to change strings into a certain format. I guess this means you cant do it with columns? Is there anyway i can format the whole column or do i have to do each string of data entered one by one?
    Thanks in advance!

    Hello Jay,
    I'm not sure you hit the right forum, as this doesn't seem to be a problem with APEX.
    Anyway:
    You can't use that function on a table like that, and as you already suggested, the to_date-function expects a string value.
    It seems you also have a misunderstanding of the basic datatypes in the database. DATE is such a datatype and is stored an internal format you don't need to care about. Each time your request the value, the database will give you a string representation according to either your locale or you give a certain formatting mask.
    The same applies to insert or update operations: you hand in either a variable of type DATE or use a function like to_date to create an "object" of type date.
    You may be interested in reading the documentation of the [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/toc.htm]Oracle Database Concepts. The section concerning datatype DATE can be found here:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/tablecls.htm#CBBGJHJC
    An overview of formatting options can be found here:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements004.htm#SQLRF00212
    So to answer your question: You would format it as part of your insert operation, taking a string and convert it using to_date.
    -Udo

  • Mass change of posting date/fiscal year in LIV parked invoices

    Hi,
    We have OSS note 99775 (program ZFSAP2_B) for mass changing posting date and fiscal year for FI parked documents but I can not use this to change posting date for LIV parked invoices.
    Did anyone have any idea how to mass change the posting date of LIV invoices? any NOTE or PROGRAM?
    I tried to create a BDC using FBV4, which in turn calls MIR4, but system is over writing  initial line item amount and qty from PO. 
    I can read initial invoice line item values and over write again but I dont think this is how I should do.
    Please advice.
    Thank you all and best Regards
    Vijay Goli

    Hi
    Thank you very much for your input.I modified the program ZFSAP2_B given by sap and it worked fine for LIV invoices also.
    When I used this program  in 2007 for FV60 documents the document key was changed without raising the event FIPP.CHANGED. But this year when we changed the posting date the system triggered the CHANGED event and as a result of this event the workflow came to the starting point. We did not make any chages to workflow template during 2007. Any idea what could have casued this event to trigger?
    Thanks
    Vijay

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • I want to change the final date format in MM/DD/YEAR.

    HI all,
    I want to change the final date format in MM/DD/YEAR. Even my profile will be in any format like DD.MM.YY or YY.MM.DD .
    can any body tell me the way..

    declare variable:
    DATA : gv_date(10) TYPE c.
    and assign value to it:
    CONCATENATE sy-datum+4(2) sy-datum+6(2) sy-datum(4) INTO gv_date SEPARATED BY '/'

  • What is the best way to dynamically create table partition by year and month based on a date column?

    Hi,
    I have a huge table and it will keep growing. I have a date column in this table and thought of partition the table by year and month. Can any you suggest better approach so that partition will create automatically for new data also along with the existing
    data? Nothing but automatically/dynamically partition should create along with file group and partition files.
    Thanks in advance!
    Palash 

    Also this one
    http://weblogs.sqlteam.com/dang/archive/2008/08/30/Sliding-Window-Table-Partitioning.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Date and Days for all year come in column

    Dear all
    I have 2 Column 1 is Date and 2nd is Day
    And i have one Button i need when i enter button then its show all year date in date column and day in day column for example
    Date---------Day+
    *1-jan-2009-Thursday*
    *2-jan-2009-Friday*
    *3-jan-2009-Saturday*
    And As on
    I hope you guys understand
    Regards
    Shahzaib ismail

    Hai,
    That means, You need to fill the multi record block which has 2 columns ( 1 is date, and the other is day.).
    For that Try this in the WHEN-BUTTON-PRESSED Trigger of the Button.
    DECLARE
         Dt_Date DATE;
    BEGIN
         GO_BLOCK ('<block_name>');
         CLEAR_BLOCK(NO_VALIDATE);
         FIRST_RECORD;
         Dt_Date := TO_DATE('01-JAN-2009');
         LOOP
              :<block_name>.TI_DATE := TO_CHAR(Dt_Date, 'DD-MON-YYYY');
              :<block_name>.TI_DAY  := TO_CHAR(Dt_Date, 'DAY');
              EXIT WHEN TO_CHAR(Dt_Date, 'YYYY') <> TO_CHAR(Dt_Date + 1, 'YYYY');   -- If next year reaches, exit from the loop.
              Dt_Date := Dt_Date + 1;
              NEXT_RECORD;
         END LOOP;
    END;          Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to add attributes in Data Column for automatic changes

    Hello everybody,
    Could you give me an advice?
    I have characteristic and attribute assigned to it.
    I want to make what when i change  characteristic(variable) its attribute in planning layout changes too. So in planning area window in <b>Characteristics Rels</b> tab i made "<i>Derivation, Combination Check and Proposal</i>" with main characteristic and its atribute. Everything works fine, but problem is, that attribute can be only in <b>Header</b> or in <b>Lead column</b>. 
    In planning layout i want to add what attribute in data column.
    Maybe where is other solutions?
    Thanks in advance
    Best Regards,
    Arunas

    Hy, Srini,
    Thanks for your response.
    There is a simple example, which describes the main principle of my solution:
    Characteristic DIVISION
    A
    B
    (filled with master data)
    Characteristic LEVEL
    1
    2
    (filled with master data)
    Characteristic NAME
    Ben
    John
    (filled with master data)
    char. LEVEL, NAME are attributes for char. DIVISION
    DIVISION with master data:
    Division  Level  Name
       A        1     Ben
       B        2     Jhon
    Planning Layout:
    In header section is char. DIVISION (variable)
    When I select DIVISION with value A, in layout values for attributes should be displayed automaticaly:
    DIVISION = A
    NAME
    LEVEL
    (Lead column)
    (Data column)
    Ben
    1
    I find solution to do it with Characteristic Rels, but i can't insert char. LEVEL into Data Column, it can be just
    in Lead Column.
    I don't know how to do it.  
    Could you suggest something?
    Best Regards,
    Arunas

  • Changing date format for some of the date columns in a subject area

    Hi,
    I have a requirement to change the date format for some of the date columns to dd-mon-yyy for only a particular subject area. Is there a feature available in the RPD which can help me do this?
    In Answers - Column Properties for a Particular column of a report, we can save the style and formatting as system wide default for the particular column or the data type, but that applies across subject areas.
    I tried with the config files too , but that too applies to all suject areas.
    Thanks in Advance,
    Gaurav

    Why don't you create 2 logical column derived from same date physical col and then change the format for one logical column and use it in Subject Area ?

  • CWB-Need to change the eligible salary column from yearly to monthly

    Hi All,
    I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
    Kindly help me guys
    Regards,
    Sajid

    You can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.

  • Record about my phone (bought in Verizon store and connected to Verizon for 4 years) has been corrupted and now I can not make any changes to my data plan. Several sessions with the technical support and management have not resolved this issue. Each time

    Record about my phone (bought in Verizon store and connected to Verizon for 4 years) has been corrupted and now I can not make any changes to my data plan. Several sessions with the technical support and management have not resolved this issue. Each time technical people and top managers promised that this issue will be resolve tomorrow and they will cal me. Nothing happend!! I can not even cancel my service not just to upgrade it. Completely locked. 
    Any advice?
    Thanks.
    Alex.

    Cannot figure out what your talking about since it makes no sense.
    If you are the account owner you can go to the My Verizon web portal http://www.verizonwireless.com
    You must log in with your cell number and your my Verizon portal password. Not the account pin.
    Once there you can change your plan and services. However repeated incorrect login attempts will lock you out of the site. It a fraud prevention measure.
    1-800-922-0204 call support with your cell number and or account number and account pin and they can assist you.
    If you don't have the information then there is nothing they can do.
    If you can verify who you are they may be able to reset your account access. But only if you are the account owner.
    Good Luck

Maybe you are looking for

  • SAP R3 FCC 6.0 - AR Aging FBL5N did not reflect correct balance

    AR aging report (S_ALR_87012173 Customer Open Items for printing) or AR Aging T-code  FBL5N did not show correcct balance which will show 100% original invoice balance even we applied the partial payment.  Anyone has same problem?  If not, what cause

  • Problem in ABAP proxy

    hai all, iam doing a abap proxy scenario in the following flow. Flow: XI (Client 800) - > XI (Client 001) ---> XI (Client 800) now when iam trying to send the data from 800 client to 001 client in 001 client sxmb_moni it is giving one error <SAP:Cate

  • Safari and Firefox not loading images

    Recently I worked on somebody's MacBook Pro computer (a few months old but software is kept up to date) but I couldn't figure out why Safari and Firefox often would not show images. This person also has a desktop PC computer with the same problem in

  • RMAN Backup Incremental levels

    hi experts, This is a 10g database running in archivelog mode. This is the backup scheme I'm currently using: backup database plus archivelog; (runs once per day) backup incremental level 1 database; this runs every 3 hours All the incrementals I mak

  • Appstore unknown error

    When I try and Upgrade to Mavericks, from an IMac (10.7.5), I get There was an error in the App Store. Please try again later. (4), when trying to log into appstore. I think my appleid is the problem. It's a very old (2004) appleid,  originally obtai