How to add date with month after convert number to month?

How to add date with month after convert number to month?
Month Date Result
24 21/11/09 24*(21/11/09)
I want to add both the column and result should be 21/11/11
Thanks
Nihar

Hmm,
Because, you are using YYYY for '09'.
SQL> ed
Wrote file afiedt.buf
  1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(TO
10/01/2009
SQL> ed
Wrote file afiedt.buf
  1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(TO
10/01/0009Or with Add_months
SQL> ed
Wrote file afiedt.buf
  1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(AD
10/01/0012
SQL> ed
Wrote file afiedt.buf
  1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(AD
10/01/2012-Arun

Similar Messages

  • How to add date with specified number of years?

    Given a date 2005-3-28.
    How do i get the date of the given above date plus 25 years?
    Please advise.
    Thank you.

    Calendar cal = Calendar.getInstance();  // Current date
    // Do something to set the given date.
    cal.add(Calendar.YEAR, 25);

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • How to add "prefix_" with DRMed Filename?

    Hi Jim,
    I want to know, How to add "prefix_" with file name (epub/pdf) which ACS generate after packaging. Suppose, I package a pdf file and ACS packaged it and store it on media server with the name of "98h3jkd98s79fdh93h.epub". Now I want ACS make this like "PREFIX_98h3jkd98s79fdh93h.epub".
    Is this possible, If yes please suggest me how to do this?
    With Regards,
    Mangal Kumar

    Hi Jim,
    I have passed <filename>, <location> and <src> parameter in our packaging request xml. File is packaging successfully and service is also placing the encrypted file to new location listed in <location> but following error is comming:
    <error xmlns="http://ns.adobe.com/adept" data="E_ADEPT_REQUEST_REPLAY http://myserverurl:8080/packaging/Package"/>
    My Packaging XML:
    $request ='<package xmlns="http://ns.adobe.com/adept" action="add">';
    $request .='<fileName>ISBN.pdf</fileName>';
    $request .='<location>ftp://username:[email protected]/www/pdf/[email protected]/www/pdf/ISBN.pdf</location>';
    $request .='<src>http://example.com/pdf/ISBN.pdf</src>';
    $request .='<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">';
    $request .='<dc:title>BISAC SUBJECT HEADINGS</dc:title>';
    $request .='<dc:creator>Book Industry Study Group, Inc.</dc:creator>';
    $request .='<dc:format>';
    $request .='application/pdf';
    $request .='</dc:format>';
    $request .='<dc:publisher>Book Industry Study Group, Inc.</dc:publisher>';
    $request .='<dc:language>en</dc:language>';
    $request .='</metadata>';
    $request .='<permissions>';
    $request .='<display>';
    $request .='<device/>';
    $request .='</display>';
    $request .='</permissions>';
    $request .='<dataPath>C:\books\ISBN.pdf</dataPath>';
    $request .='<expiration>'. $expiration .'</expiration>';
    $request .="<nonce>" . $nonce . "</nonce>";
    $request .='</package>';
    Please suggest me why the "E_ADEPT_REQUEST_REPLAY" error is comming.
    I am waiting your reply...
    With regards,
    Mangal Varshney

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • How to add data in a file

    hi,
    I have written following code.I have a file. i want to add data in this file.
    When i add data then data is added but i donnot get the previous data. What`s the problem of my code? Is there anyone can help me? how i will add data with the previous data? Please help me.
    String username=request.getParameter("UserName");
    String userage=request.getParameter("UserAge");
    String address=request.getParameter("UserAddress");
    String sex=request.getParameter("sex");
    FileWriter f = new FileWriter("d:\\download_dreamweaver\\Project_3\\WebContent\\SaveData.txt");
    f.append(username);
    f.close(); ith regards
    bina

    Looks like you're creating a new file (which overwrites the old one) every time. You need to open the file first and then append to it.

  • How to Add a Physical Interface After Installation in Solaris 10

    How to Add a Physical Interface After Installation in Solaris 10
    Hi Java Specialist,
    I am trying to setup a network interface with the following steps on a new fresh Solaris 10 installation using the instruction titled How to Add a Physical Interface After Installation in Solaris 10 3/05 ONLY from http://docs.oracle.com/cd/E19253-01/816-4554/esxhb/index.html:
    1. # ifconfig lo0 plumb up
    2. # ifconfig lo0 10.56.8.101 netmask 255.255.240.0. This was the working Windows DHCP environment prior to installing Solaris
    10 on top of it.
    3. # Added saturn to /etc/hostname.lo0.
    4. # Added 10.56.8.101 to /etc/inet/hosts
    5. # Added 10.56.0.0     255.255.240.0 to /etc/inet/netmasks
    6.# reboot
    However, the following errors kept recurring:
    svcs –xv …. unable to qualify my own domain name,
    failed with exit status 69.
    Any idea on what other steps have I missed? I was hoping to only do step 3 – 6 for the change to apply permanently.
    Many thanks,
    Jack

    Hi Java Specialist,... in a Solaris forum?
    1. # ifconfig lo0 plumb upThe loopback connection (your lo0)is NOT a physical interface. There are no hardware components for it. Nor can I think of any reason why it should ever be anything other than the default 127.0.0.1
    Use your favorite Internet search site (such as Google, Bing, Yahoo) to learn more about it.
    2. # ifconfig lo0 10.56.8.101 netmask 255.255.240.0. This was the working Windows DHCP environment ...I have no idea how a nonexistent software construct gets a DHCP address in a MS Operating System, unless you are confusing this with the "Microsoft Loopback Adapter" which is an utterly different concept. Again, go see what Google tells you.
    <br>
    <br>
    <br>
    ... completely unrelated to configuring an IP...
    unable to qualify my own domain nameAgain, search the Internet or even search these forums with that string of words.
    Go back through your two most recent posts and read the responses again.
    They seem to both be on the same topic as this new one -- configuring an IP on something.
    How to initialize new IP address on secondary interface permanently
    How to change IP address permanently on Solaris 10
    When you've done all that, then come back and tell us what you are actually trying to do.

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • How to add docentry with some num.?can you solve below query   Declare @a as Numeric SET @a=14900000; SELECT (@a+($[@MAINTDCHEAD.DocEntry])as 'series no'

    how to add docentry with some num.?
    can you solve below query
    Declare @a as Numeric
    SET @a=14900000;
    SELECT (@a+($[@MAINTDCHEAD.DocEntry])as 'series no'

    Hi,
    Yes possible.
    Try this:
    Declare @a as INT
    SET @a=14900000;
    SELECT (@a+($[ORDR.DocEntry]))
    Thanks & Regards,
    Nagarajan

  • How to add effects with snow?

    How to add effects with snow like Apple does when the introduce a new product?

    Flex Builder Help. Basically pressing F1 in Flex Builder or
    Help -> Help Contents menu option.

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to block changes of PR after convert into PO

    how to block change/deletion of purchase requisition after convert into purchase order without changing/deleting PO.

    Hi
    Goto customizatin of rellease procedure of p.req, in that select setup procedure with classification  and select release indicator,and select details in that changeability indicator is there in that you will select based on your requirement
       changeble,new release in case of release strategy
    1-cannot be changed
    2-changeble,no new determination of strategy
    3-changeble,new release in case of release strategy
    4-changeble,new release in case of release strategy or value change
    select in the list and save and check your scenario.
    Thanks

  • Script task how to add date value

    hi
    i have following code i am trying to add date into script task
     Public Overrides Sub CreateNewOutputRows()
            Dim vars As IDTSVariables100
            Dim vars1 As IDTSVariable100
            Dim recordCount As Integer
            Dim rdate As Date
            ' Dim recount As Integer
            '  Dim rcount As Integer = 0
            'Get the record count
            Me.VariableDispenser.LockOneForRead("RecordCount", vars)
            recordCount = CType(vars("RecordCount").Value, Integer)
            ' rdate = CType(vars("CurentDate").Value, Date)
            vars.Unlock()
            Me.VariableDispenser.LockOneForRead("CurrentDate", vars)
            rdate = CType(vars("CurrrentDate").Value, Date)
            ' rdate = CType(vars("CurentDate").Value, Date)
            vars.Unlock()
            'Me.VariableDispenser.LockOneForRead("rcount", vars)
            'rcount = CType(vars("rcount").Value, Integer)
            'vars.Unlock()
            '  rcount = rcount + 1
            'Output one row with record count
            Output0Buffer.AddRow()
            Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
            Output0Buffer.SetEndOfRowset()
    in SSIS i have declare CurrentDate in datetime and i need to use it here , but i am getting error.
    how to append its value to       Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
    its in vb ,i dotn know anything about VB ,please help me.
    i havent put anything in  readonly,readwrite in script task.ecordCount is working but i did same  for rdate and its not working

    how to get that value in yyyymmddhhmmss format in ssis.
    whats expression i need to use.
    also how to give single  space here between recordcount and variables.rdate
    Output0Buffer.FooterRow = String.Format("ABC" & recordCount & Variables.rdate)

  • How to clone data with in Table with dynamic 'n' number of columns

    Hi All,
    I've a table with syntax,
    create table Temp (id number primary key, name varchar2(10), partner varchar2(10), info varchar2(20));
    And with data like
    insert itno temp values (sequence.nextval, 'test', 'p1', 'info for p1');
    insert into temp values (sequence.nextval, 'test', 'p2', 'info for p2');
    And now, i need to clone the data in TEMP table of name 'test' for new name 'test1' and here is my script,
    insert into Temp  select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test1';
    this query executed successfully and able to insert records.
    The PROBLEM is,
    if some new columns added in TEMP table, need to update this query.
    How to clone the data with in the table for *'n' number of columns and*
    some columns with dynamic data and remaining columns as source data.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 10:37 AM

    Hi,
    Thanks for the quick reply.
    My Scenario, is we have a Game Details table. When ever some Game get cloned, we need to add new records in to that Table for the new Game.
    As, the id will be primary key, this should populate from a Sequence (in our system, we used this) and Game Name will be new Game Name. And data for other columns should be same as Parent Game.
    when ever business needs changes, there will be some addition of new columns in Table.
    And with the existing query,
    insert into Temp (id, name, partner, info) select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test'_
    will successfully add new rows but new added columns will have empty data.
    so, is there any way to do this, i mean, some columns with sequence values and other columns with existing values.
    One way, we can do is, get ResultSet MetaData (i'm using Java), and parse the columns. prepare a query in required format.
    I'm looking for alternative ways in query format in SQL.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM

  • How I average data with 78,74,73 and 55 points respectively and end up with an array of 78 points for the average?

    Hi
    As the questions states, how do I average data with 78,74,73 and 55 points respectively and obtain an array of 78 points? 
    When I use the plus vi, Labview somehow produces an array of 55 points when I do the average (see attached vi).
    I have been unlucky in trying to get good results.
    Can anyone help?
    Thank you.
    Attachments:
    average4.vi ‏40 KB

    The add function is polymorphic. It accepts arrays as well as numerics, but you need to understand one thing about array operations in LV. Operations performed on arrays of different sizes will always (I think) work based on the smallest array. For example, if you auto index 2 arrays of different sizes into a for loop, the number of times the loop will run will be the size of the small array. The same is true here - when you wire 2 arrays of different sizes to the add function, only the first N elements of the larger array get processed. The rest are dumped. That's why you get 55 elements.
    Attached is a modification of your VI which shows 2 things:
    The bottom part is your algorithm, only cleaned up. Note how much easier it would be to read now. You should always write clean code. Also, note that I have changed the representation on some of the data from DBL to I32. This is because this is the representation the array function work with and your code had the DBLs coerced for no reason.
    The top part is a different algorithm which should do what you want. Note that like Mike said, the arrays with smaller sizes will have 0s appended at the end, so if you want to avoid that, you will have to modify the last part, where the averaging is done and only divide those columns which are long enough.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!
    Attachments:
    average4MOD.vi ‏63 KB

Maybe you are looking for