Calculation to expiry date

Hello

I want to insert expiry date by adding 6 months.

Thanks to anitcipation

Christy H. wrote:
Thanks for the reply

I tried to follow but not added 6 months to the sysdate. Please notify

SQL> desc accounts
Name                                      Null?    Type
----------------------------------------- -------- ----------------------------

ACCOUNT_ID                                NOT NULL NUMBER(14)
USER_ID                                            NUMBER(14)
ENTRYDATE                                          TIMESTAMP(0)
PAYMENTDATE                                        DATE
DESCRIPTION                                        VARCHAR2(500)
CURRENCYSYMBOL                                     NUMBER(2)
AMOUNT                                             NUMBER(5)
CVSLIMIT                                           NUMBER(5)
JOBSLIMIT                                          NUMBER(5)
PACKAGE                                            NUMBER(5)
EXPIREDATE                                         DATE

SQL> insert into accounts(expireDate) values(add_months(sysdate,6));

1 row created.

SQL> commit;

Commit complete.

SQL> select to_char(entryDate,'dd-Mon-yyyy'), to_char(expireDate,'dd-Mon-yyyy')
from accounts;

TO_CHAR(ENTRYDATE,'D TO_CHAR(EXPIREDATE,'
-------------------- --------------------
25-May-2012
25-May-2012
25-May-2012          25-Nov-2012

SQL>

HUH?
is not NOV-25 six months spent on MAY 25?
May is the month = 05 & 5 + 6 = 11; which is November.
If you think you have a problem, then I can't force you to think straight.

Tags: Database

Similar Questions

  • Automatic expiry date ever

    I'm creating a certificate. When it opened it must be 2 years expiration date in the future. Right now that it will not automatically updated the date to 2 years in the future from the date when the document is opened, for example, I opened the document today and it should say "July 4, 2018 expiry date", but it does not work.

    I created a formula and it worked once, but doesn't seem to work again.

    I did the same thing in a word document and finally managed to do work. But then I try to open the word document in pages, he does not see the formula.

    Can help please.

    With regard to the Ed

    Set up a single line, two-column layout table. You put the certificate, or Expiration text in the first cell and in the second cell you format with the localized date format (for example day monthname YYYY). Set any time. The formula that you want in the cell is:

    It says show date from the start date (now) that it is 24 months in the future.

    Now, when remove you the edge of the table and remove the grid lines, you end up with the following auto-update. Pages v5.6.2 and OS X 10.11.5.

    Pages is not a clone of Word, so don't expect do not feature (macros, formulas of table) to work when they are brought to the opening in the internal Pages document format.

  • calculation on line data

    Hello world

    I have just started using the tiara and I have no idea how I can do a few calculations, I want to have chanell with result depends on the other chanells, but not the same data line, I can use the SMC (line, no.) and I can do to make it function in a cell with my result chanell (example for the first row of data (: SMC (1, Ch("[4]/Channel1")) = (ChD (1, Ch("[4]/Channel")) + SMC (2, Ch("[4]/Channel"))) / 2), but I don't know how I can do this function automatically for the other line (for example, line 2 ChD (2, Ch("[4]/Channel1")) = (ChD (2, Ch("[4]/Channel")) + SMC (3, Ch("[4]/Channel"))) / 2) I have a line of 500,000 of data so I need know some functions that will be clalculated this function on the lines of my data. I will be grateful for your help.

    Hello!

    For performance of good calculations on your data of type long, you must use a formula in tiara. In the past, it was the FormulaCalc command. Today, the ChnCalculate is recommended. The similar oddity in the two commands, they can only do calculations on one line (it's repeat them verry fast for all lines). For you the problem this behavior results in a no aproach obvoius. You must copy your data to a second channel, remove the number of values that gives your shift and then use the two channels for the calculation. Here's the script for offset = 1:

    Call ChnCopy("[1]/Channel","[1]/ChannelCopy")
    Call DataBlDel("[1]/ChannelCopy", 1, 1)
    Call ChnCalculate("Ch(""[1]/Result"" )= Ch(""[1]/Channel"" ) + Ch(""[1]/ChannelCopy"" )/2")
    

    Matthias

  • just to ask the expiry date of my subscription?

    just to ask the expiry date of my subscription to Photoshop?

    Journal ate Adobe.com go to manage your account and to manage your plans

  • Completed the assignment of employees not being not an expiry date

    Dear gurus,

    I've put an end to an employee and his status is listed as Ex - employee, but its mission is not date until the end of expiry date. I don't know what the problem is? in fact is even let me open the assignment form after the date of termination, where as in the normal case, it don't even allows us to go to the assignment form after the date of termination.

    Help please

    Muhammad Noman moomo

    No. I expect to arrest date actually change his status of ACTIVE_ASSIGN to TERM_ASSIGN as to the effective termination date. I expect the assignment of TERM_ASSIGN to maturity as at the date of final treatment. That's how Oracle HR has always worked.

    Clive

  • expiry date of 30 days

    Hello

    I am trying to create an expiry date of 30 days for action.

    Start by getting the date on a specific date of departure.

    var D1:Date is new date;.

    Add 30 days:

    D1. Date += 30;

    Implement a getDate function:

    var, D2: date = new date;

    How do you compare D1 and D2 as date (not the numbers) to check if the D2 is higher than D1 more 30 days? Will this work? For example, if today is May 8, then += 30 would be June 7. How to compare if a date is obtained on 9 June and compared to a May 8 stored (THUS, for example), it is higher (then do something condition)?

    If (D2 > D1) {}

    do something

    }

    Any help appreciated.

    saratogacoach

    Google search using 'AS3 compare dates' and you should find what you need

  • Purchase contract expiry date and the date of breakdown of the course on the cover

    Hello

    In the blanket purchase agreement, I see the expiration date and price paused I see the date and to this day, can someone tell me the difference between these two dates?

    Question

    1. when I try to put an end date (expiry date) to one of the line I get this error message, or when I try to cancel the po line giving a reason, he throws the same error.

    The error

    "You cannot cancel or finally close this agreement line because it has open purchase order lines with reference to this document."

    Concerning

    Sudharshan

    Hi Sudarshan,
    If you are satisfied with the answer, then please mark this thread and close so that other people can return it in the future, otherwise it will create a confusion that this question was never answered/processed... :) Hope you agree with me... Let me reiterate, I'm not a greedy person on points... I just joined this forum to learn many good consultants autour.

    Kind regards
    S.P DASH

  • Calculator HP48SX setting Date and time do not work

    Hello

    I use a HP 48SX calculator.

    The date and time is wrong.

    When I put date and time following message comes:

    Catalogue of vacuum.

    I use to set the date and time after orders

    Blue arrow to the right

    TIME

    What's wrong?

    Please help.

    Using this calculator with 48GX it works well.

    Jochen

    Hi!, jochen2:

    Welcome to Forum!

    Example of time... 13.52-> TIME... and press the ENTER key

    You can change the shape, to see (A / h, 12/24, m/d).

    To change or set a DATE... 08.102015-> DATE... and press the ENTER key

  • Continuously perform calculations on the data

    Hey guys,.

    So I have this program that generates pulses of signals using NOR-SCOPE, and I initially did so that each time that the user presses a button that they will perform certain calculations in order to generate a value that is stored in a table. My mentor now wants me to do so that it generates continuously pulse signals (not a single signal) and adds the values in a table. The signal seems so I need to use the parameter N samples on NI SCOPE as it does in the code below, although if anyone has a way to change this, it would be nice too.

    So basically, how can I calculate continuous pulse generated automatically over time signals? The user does not have to run the program and the computer does the rest.

    Thank you!

    You must migrate to a structure of producer/consumer. In the loop of the producer acquire the data contimuously and pass it to the loop of consumption. In the loop of the consumer, analyze the data and store the data as needed.

    A variation on the theme that I recommend is that instead of using a queue to pass data, use a user-defined event. The reason for this change is that your current code (which is basically what will end up in the loop of the consumer) is so pass data to loop through an event will allow him to fit into the current structure of the user interface.

    Oh, Yes, one more thing: get rid of the Express live. It's time to remove the training wheels...

    Mike...

  • E14 ACER: EXPIRY DATE OF CARTRIDGE IN HP PHOTOSMART C5280 ALL-IN-ONE

    HOW CAN I REPLACE EXPIRED INK CARTRIDGE IN THE PRINTER ALL-IN-ONE PHOTOSMART C5280 HP?

    Hey @mmaxxor,

    Welcome to the Forums of HP Support!

    I understand that you are looking for a way to override the expiration date for all-in-one printer, HP Photosmart C5280 ink cartridge. I want to offer you information about expiration dates.

    Expiration dates can be reset on cartridges. But expired cartridges should work correctly in your HP Photosmart too long that the cartridges have been installed on your printer before expiry. If you bought new cartridges that have already expired they likely won't work in your printer and there is no replacement for that cartridges are expired. If this is the case, you may want to consider bringing back them to the store or speaking with our Technical Support phone queue to explore additional options.

    If you had a cartridge installed in your HP Photosmart camera and would use very well and at random, to get the message that the cartridge has not expired, you should be able to hit OK on this message and continue using the printer as per normal.

    For more information on the guarantee one couverture coverage for ink cartridges and printheads, please click on here.

    Please let me know if the information I have provided solves your problem. Good luck!

  • Calculating a due date in XI from Adobe using Java script...

    I have two fields in a form. One with the current date is calculated by the following:

    var f = this.getField ("Today"); f.value = new Date();

    The second field, I try to add 7 days to the, but I can't understand it. What script do I need to add in the existing field is filling date and add the new field to fill out this information. I tried a lot of what I found on the internet but nothing seems to work...

    "In addition, please note that I use the ' Document Javascripts" Editor-in-Chief of Adobe Pro XI.

    Any help is appreciated


    It is possible. To make it work as you want, the custom in the field today calculation script should be:

    Custom calculation script

    (function () {}

    Get a reference to the DueDate field

    var f = getField ("DueDate");

    If (event.source & event.source = f) {}

    Proceed with this script if it is triggered by a change in the DueDate field

    return;

    }

    Update the value of this field to show the current date

    var d = new Date();

    Event.Value = util.printd ("mm/dd/yyyy", d);

    Add seven days to the date of the day

    d.setDate (d.getDate () + 7);

    The DueDate field update

    f.Value = util.printd ("mm/dd/yyyy", d);

    })();

    But first remove the DueDate field calculation script. If you do not the unalterable DueDate field, a user will be able to change, but it will reset when any field value changes.

  • Calculation of current date or the previous months

    Script gurus of wishes!

    I would like to ask help on calculating Date.

    Here's my current scenario:

    The user enters a date mm/dd/yyyy ("DateField")

    Power here ask the 'DateField' to calculate these items:

    Less "DateField" 12 months = ("12MonthsAgoDateField") / mm/yyyy

    'DateField' 18 months = ("18MonthsAgoDateField") / mm/yyyy

    'DateField' less than 36 months = ("36MonthsAgoDateField") / mm/yyyy

    and so on...

    I read some posts Date of calculation, but could barely find anything that fit this scenario.

    Freely, I confess that my ability to script is very minor.

    I would appreciate help in this script.

    Thank you!

    If you really want to go into the details (or not the time to do)

    Here is the simple solution to your problem.

    I wrote a small function (a few lines)

    Put this in the document level javascript

    Function level javascript document-

    function getPastDate (textFieldName, month) {}

    var util.printd = cDate ("dd/mm/yyyy", new Date (this.getField ("textFieldName") .value));

    sDate var = util.scand ("mm/dd/yyyy", cDate);

    If (sDate == null) {}

    App.Alert ("Please enter a valid date in the form \"mm/dd/yyyy\". »)

    } else {}

    update var = new Date (sDate.getFullYear (), (sDate.getMonth () + months), sDate.getDate ());

    Return util.printd("mm/yyyy",pDate);

    }

    }

    Now suppose that we have a text box name "Text1" including the date in the format "mm/dd/yyyy".

    1st parameter is for the name text box (seen the date that you want to process)

    2nd parameter is the number of months (to subtract pass a negative value)

    If you want to get the result in another area of text "Text2" write the following code in the event to calculate Text2

    Event.Value = getPastDate ("Text1",-12);

    This removes 12 month value "Text1".

    Hope this will help

  • Calculation of the date fields

    Hello

    I have three fields. 2 are formatted with the date field, and the third for the calculation of the difference between 2 date fields.

    For example, Field1 said August 2012, and field 2 said Sep 2012. Is it possible that I can do field 3 dipslay the 1 (month) response?

    Any help would be greatly appreciated.

    Thank you

    Yes, you use the date object JavaScript extract fields of the whole of the year and the month, create a common denominator for the month and year, and do the math.

    The event of calculation for the number of months:

    Delete the result value

    Event.Value = "";

    get field values

    var sStart = this.getField("Date1").value;

    Send var = this.getField("Date2").value;

    process if we have data

    If (sStart! = "" & send!) = "") {}

    convert date objects date strings

    var start = util.scand ("mmm yyyy", sStart);

    oEnd var = util.scand ("mmm yyyy", sending);

    get the full date and month year beginning

    var nStartFullYear = oStart.getFullYear ();

    var nStartMonth = oStart.getMonth ();

    convert data from start of month

    var nStartMonths = (nStartFullYear * 12) + nStartMonth;

    Get the complete year end date and month

    var nEndFullYear = oEnd.getFullYear ();

    var nEndMonth = oEnd.getMonth ();

    convert data from end of month

    var nEndMonths = (nEndFullYear * 12) + nEndMonth;

    do the math

    Event.Value = nEndMonths - nStartMonths;

    } / / end have given

    You will need to adjust the names for the start and end dates.

  • Calculation of field date

    I have a form that the user enters a date of completion of a given field and I want to have this date + 45 days calculated in another area (expiration date). Any ideas on writing scripts for it?

    Place the following script in the event out of the full date field. The value of the FormCalclanguage.

    Duedate.rawValue = Num2Date (Date2Num (complete.rawValue, "YYYY-MM-DD") + 45, 'YYYY-MM-DD');

    Thank you

    Srini

  • Can I have my e-mail messages stored on my hard drive with no expiry date?

    My mail server deletes mails after two weeks. When I used Outlook, messages are automatically stored on my hard drive without expiration date. Can I configure Thunderbird to do the same thing?

    Using the Inbox for the storage of messages to long term is a recipe for disaster.
    You must create folders in your e-mail of 'keeper' under the account of the Local folder and sort messages in these folders.

    Read this article on the maintenance of your e-mail folders.

    The help site seems to be down at the moment. I'll add the link as soon as I can get for it.

    Here is the link.
    http://KB.mozillazine.org/Keep_it_working_-_Thunderbird

Maybe you are looking for