Add 30 days to the output of the date

Hello, how do you add 30 days to the date in the hidden field.

Also is there another way to do this?
Thank you


1. my query in query page


< name cfquery = "getdate" datasource = "" #request.dsn # "LignesMax ="1">"
SELECT
MyTable_date
FROM MyTable
where
Tcase.case_id = #mainquery.mycaseID #.
< / cfquery >


2. my hidden fields in my query on the query page

subsist = # getdate. MyTable_date #;


3. my output in the output page
< cfoutput >
< td width = "45%" > < date hard >: < facilities > #DATEFORMAT(thedate, "mm/dd/yyyy") #.
< / cfoutput >

dateAdd (would be ', 30, live)

Tags: ColdFusion

Similar Questions

  • Add 44 days to the current date and display DD mmmm yyyy

    I created a form in Acrobat Pro ms and I need a form field to display the date 44 days from the day that the form is completed.  Searched these forums and responses found that are close but they all seem to calculate the base on another field in the document.  I do not have the date of the day on the form and I'm "challenged" javascript, so cannot get out.

    For example, when the user opens the form today (October 13, 2015) the field must display on 26 November 2015.

    Thanks in advance for your help.

    Another approach would be to use JavaScript getDate() and methods setDate() for the date object.

    Get the current date object.

    var oNow = new Date();

    object of the new date

    oNew var = new Date();

    get the current date of the date object.

    var nNowDate = oNow.getDate ();

    Add 44 days at the time of the day;

    var nNewDate = nNowDate + 44;

    new date of update object;

    oNew.setDate (nNewDate);

    format of the new text string to date object.

    var cNewDate = util.printd ("dd mmmm yyyy", oNew);

    value of the field of play;

    Event.Value = cNewDate;

    show some information;

    Console.Show ();

    Console.clear();

    Console.println ("today is:" + util.printd ("dd mmmm yyyy", oNew));

    Console.println ("today's date is:" + oNow.getDate ());

    Console.println ("current date = 44 days:" + nNewDate);

    Console.println ("44 days now is:" + cNewDate);

    The script could be made more compact by combining several lines of code in one line of code:

    Get the current date object.

    var oNow = new Date();

    Add 44 days at the time of the day;

    oNow.setDate (oNow.getDate () + 44);

    value of the field of play;

    Event.Value = util.printd ("dd mmmm yyyy", oNow);

  • Disable certain days in the date picker

    Hi, I use Apex 4.2 and want to find a way to disable certain days in the date picker.

    For Ex: I want to turn off Mondays and the days of the week when the date picker popup is shown. And also I want all the previous days from today should be disabled.

    Please let me know how I can do this...

    Thank you

    Hello

    to disable different days look at this site: http://jquerybyexample.blogspot.com/2010/07/disable-specific-days-in-jquery.html

    To deactivate the days in the past, add this in: settings > Minimum Date: + 0d

    See you soon,.

    Tobias

  • How can I add an ISO to the data store?

    How can I add an ISO to the data store?  It doesn't let me access the ISO.

    of the error, it seems that your iso is bad.

    hitting a md5 checksum or re-download the iso

  • get more records of 30 days from the date of the day

    I use MS SQL 2000 How can I recover the data that are older than 30 days from the date of the day? I put currendate "DateTime" field as data type and length is the '8 '.

    < cfset variables.getdate = DateAdd (would be ',-30, now()) >

    Select dataname
    of tabletest
    where currendate > = "variables.getdate."

    the sql stmt above does not work.

    Select dataname
    of tabletest
    where currendate<= #createodbcdate(dateadd("d",="" -30,="">

    You say that you want records which are more than 30 days from now, so that it must be less than or equal to the date
    But if you want the Chronogram of 30 days there are until now then it must be greater than or equal to

    Ken

  • find the days from the date of...

    Hi all

    I have a date saying (06-mar-2009), then how do you know what day is the same day as today (Friday)... and I need to create a table based on another table and must include all dates it's Saturday...

    If someone can help me...

    Thank you
    Pankaj

    If you are looking for the week then->

    CREATE TABLE test
    AS
      SELECT *
      FROM emp
      where to_char(hiredate,'DY') NOT IN ('SAT','SUN');
    

    Another thing,

    CREATE TABLE test
    AS
      SELECT *
      FROM emp
      where to_char(hiredate,'DY') IN ('SAT','SUN');
    

    Alternatively,.

    Please post your desired output of your sample data.

    Kind regards.

    LOULOU.

  • Can I remove the day of the date of blog?

    Hello, can someone help with this? I went through the documentation and google, I can't find an answer.

    How can I remove the day of the blog post so that the date reads simply "18 March 2015' and not 'Wednesday, 18 March 2015? '"

    I use this {tag_blogpostdate}, none of the other tags of here give me that http://docs.businesscatalyst.com/dev-assets/reference#! / tag-reference/Articles/blog-post-deta they - layout.html And I can't find anywhere that shows me how to customize IT.

    You can not, you have all the options except if you activate beta liquid markup and BC.next and then use the liquid and then apply the date filter. A little a lot right now, if you're not familiar, and it's the only thing you want to change at this point.

  • By clicking on the button Add a Page removes the data of the initial page.

    I have a button Add a Page on the first page. I enter my first page of information. When I click on the button Add a Page, a new page (page 2) is added, but the information that I entered the first page disappears. I have attached the form that I'm struggling with. Any help would be appreciated!

    Changed your samples to make it work.

    1. to the subform Page 2, you must set the minsize as 0, themaxsize to 1, and the initial counter to 0. By doing this there is no addressable object to the script against.

    2. in the code that adds the page, you have a command:

    Form1. Page2.InstanceManager.addInstance)

    As it is has no present subforms to Page2, you get an error on the object existing do not. The Page2 object does not exist so that you can not call the instanceManager. So, you should use a different rating to reach the instanceManager. In this case you vcan use notation of underscore (_) to access the instanceManager to an object that is not yet part of the provision. So, your order will be:

    Form1._Page2.addInstance ().

    3. you can disable the button after they add the second page as well as position the cursor in the 1st field on the next page. To do this, you can add this code:

    xfa.host.setFocus (Page2.Table1.Row2.Action_Step);
    This.Presence = "invisible";

    Note that you need to reposition the cursor before you hide the object or the leather, the code of the button will not work.

    Hope that helps

    Paul

  • Validate the difference in days between the dates in a table

    Greetings,

    I have a tabular form and date on each line. When the user saves the form, I want to sort the rows by chronological order of these dates, then go get the first and last date, calculate the difference between them and validate it.

    Does anyone know how to do?

    From now on, I came up with this:

    1. a PL/SQL Page process "before the calculations and Validations' which creates a collection and inserts lines in my tabular form (p_c004 being the date field):
    begin   
      if apex_collection.collection_exists('UPDATE_DATES') then
        apex_collection.delete_collection('UPDATE_DATES');
      end if;
    
      apex_collection.create_or_truncate_collection('UPDATE_DATES');
    
      for i in 1..apex_application.g_f04.count
      loop
          apex_collection.add_member(
              p_collection_name => 'UPDATE_DATES',
              p_c002            => htmldb_application.g_f02(i),
              p_c003            => htmldb_application.g_f03(i),
              p_c004            => htmldb_application.g_f04(i),
              p_c005            => htmldb_application.g_f05(i),
              p_c006            => htmldb_application.g_f06(i),
              p_c007            => htmldb_application.g_f07(i));
      end loop;
    end;
    and

    2. a "PL/SQL Error: Validation
    DECLARE
      l_count NUMBER;
    BEGIN
      apex_collection.sort_members('UPDATE_DATES', 4);
      l_count := apex_collection.collection_member_count('UPDATE_DATES');
    
      SELECT
      to_date(c004(l_count),'DD/MM/YYYY') - to_date(c004(1),'DD/MM/YYYY') Difference 
    
      FROM 
      apex_collections 
    
      WHERE 
      collection_name = 'UPDATE_DATES'
      and to_date(c004(l_count),'DD/MM/YYYY') - to_date(c004(1),'DD/MM/YYYY') < 30;
    
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        raise_application_error(-20101, 'Error');
    END;
    In my understanding, the validation must sort the collection in chronological order of the dates entered, calculate the difference in days between the nearest and farthest date and return it if it's less than 30 years (the difference in days allowed). If it's more than 30 years, the SELECT statement does not return anything and my block of exceptions raises a custom error that will trigger the validation "process of refusal."

    But when I try this, it tells me c004 does not exist and if I drop the parentheses, it works, but of course, it does not give the desired result.

    Any ideas?

    Best regards
    Mathieu

    Assuming that your domain is c004 then I don't see the need for the sorting of the collection.

    You can write a simple SQL select that sent you the desired result.

    Maybe something like this not tested

    SELECT
      max(to_date(c004,'DD/MM/YYYY')) - min(to_date(c004,'DD/MM/YYYY') ) Difference
      FROM apex_collections
      WHERE collection_name = 'UPDATE_DATES';
    

    The test if the result is > 30 days. If that's what you want to know.

  • Find the number of days between the dates...

    Hi friends,

    I am new to this development of blackberry applications so I do not know how to find the number of days between two days. Y at - there any API is avilable otherwise we have to write our own code. In fact, I tried GregorianCalendar but I get error that cannot find the symbol but I already imported net.rim.device.api.util and package java.util also... Please give an idea how to solve this problem.

    with respect,

    s.Kumaran.

    Use DateField class instances to represent dates on the screen.

    And your code will be as follows:

    long date1 = date1DateField.getDate ();

    long date2 = date2DateField.getDate ();

  • UNPIVOT day after day in the data range


    Hi all, I am new to this forum. I have this table

    name startDT endDT value
    car1 January 14January 3, 1410
    boat2 January 145 January 1411
    plane7 January 147 January 1412

    and I want this result:

    day name value
    1 January 14

    car

    102 January 14car10January 3, 14car102 January 14boat11January 3, 14boat11January 4, 14boat115 January 14boat117 January 14plane12

    As many tanks

    I give you one example. Use the query like this

    Select t.nom,

    t.startdt + Level-1,

    t.Valeur

    of t

    connect by level<=>

    and first name = name

    and prior sys_guid() is not null

    ----

    Ramin Hashimzade

  • Find days between the dates expressed in days.

    Hi, I have a table with a structure similar to the following:

    LP1 TIME_EQ P_DAY LP2
    17.2

    0

    MONDAY
    16.8

    0.25

    TUESDAY
    17.03.5THURSDAY
    17.75FRIDAY
    17.41FRIDAY
    16.9.25SATURDAY
    17.1.25SATURDAY
    17.5SUNDAY

    Now I have two variables dates D1 = October 10, 2013 (Thursday) and D2 = 13 October 2013 (Sunday).

    How do I change my table such as only the lines covered between dates D1 and D2 are updated? In this case, the lines where the P_DAY (Thursday, Friday, Saturday, Sunday) I will use it for my slider, my query begins with this:

    CURSOR LOAD_PROF is

    SELECT LP1, TIME_EQ, P_DAY

    DE LOAD_PROFILE_TEST

    P_DAY in (? days between D1 and D2).

    I hope you get my point.  Thank you.

    First impression is that your table design seems incorrect to me. Why just store DAY? Why not the whole date?

    Says you can do this

    Select lp1

    time_eq

    p_day

    of load_profile_test

    where p_day in)

    Select to_char (start_date + (level 1), "fmDAY") day_

    de)

    Select to_date (October 10, 2013 ',' mon-dd-yyyy "") start_date

    , to_date (13 October 2013 ',' mon-dd-yyyy "") end_date

    of the double

    )

    connect

    by level<=  end_date="" -="" start_date ="" +="">

    )

    And finally the cursor? Try to do so in direct SQL. Do not loop through a cursor. If you share this part, we can give you best suggestion on the implementation of your real problem.

  • How do I add 7 days to a date and compare it to the current date in a cfquery?

    I have classes that are no longer active once after the date of the class. However, the class should be displayed for seven days more in the backend. I tried to use the script below to get there, but I get an error "Variable DATE is not defined." I'm going in the right direction or is there a better way to do this?

    < name cfquery = "getClasses" datasource = "#application.dsn #" >

    Select *.

    (break the classReg INNER JOIN classReg.classID = classes.classID) INNER JOIN instructors ON classreg.instID = instructors.instID

    <!-adding seven days to the date of the class (date) by comparing the current date->

    where #DateFormat (DateAdd (would be ', 7, date), 'yyyy-mm-dd') # > #DateFormat (now (), 'yyyy-mm-dd') #.

    < / cfquery >

    where #DateFormat (DateAdd (would be ', 7, date), 'yyyy-mm-dd') # > #DateFormat (now (), 'yyyy-mm-dd') #.

    As Coldfusion said you, quite rightly so, he knows no variable called "date". You're in a request and, apparently, 'date' is a column name. So use the SQL functions instead of Coldfusion functions.

    In MySQL, the appropriate where clause is:

    WHERE DATE_ADD (date, INTERVAL of 7 DAYS) > CURDATE)

    In SQL Server, the appropriate where clause is:

    WHERE DATEADD(day,7,date) > GETDATE()

    ---------------------------------

    Afterthought: I would rename the column 'date', as it is a reserved word in some database management systems

  • Find the Date day i.e. Monday, Tuesday etc.

    Hello

    I need to know the day of the Date. that is to say Monday, Tuesday etc. This is because if the date falls on Saturday or Sunday it had to impose tariffs of difference and week with normal rates.

    Thank you
    Amol

    We should probably add a function for this that I've certainly seen the prior requirement.

    Fortunately it is quite easy to calculate using a simple rule - the trick is to choose a date in the past which was a Monday, and then use the modulo operator.

    For example:

    The day of the week = (date data - 1980-01-07) modulo 7

    That is to say January 7, 1980 was a Monday, so every 7th day after is also a Monday - combined with the modulo operator, this will give you:
    0 Monday
    1 Tuesday
    ...
    5 Saturday
    6 Sunday

    The only downside is that the dates before 1980-01-07 will give a negative modulo (this differs from the mathematical modulo operator, but must be symmetrical with the whole division operator truncate to zero)-was so before the reference date will give:

    0 Monday
    Tuesday-6
    ...
    -2 Saturday
    -1 Sunday

    You can choose to write the rules to take into account, or choose a reference date so far in the past that it is useless.

    Concerning
    Andrew

  • Issue of conversion from string to DateTime to subtract the duration of 1 day in the XSLT file

    Hello

    I need to subtract the duration 1 day after the date of entry which is in the format "yyyy-mm - ddT00:00:00"(data type = String)
    I tried to use the available function: subtract-dayTimeDuration-from - dateTime () but this function expects the entry in the datetime data type and so on use of this I get Null as the result of the transformation.

    I used to convert the input string, dateTime() but it doesn't seem to work because I get the error "Invalid Xpath expression (null).

    Please help identify any other way I can convert the string to dateTime format and then subtract the duration. Or another way to subtract the length of the day 1 of the string itself.

    Thanks for the help!

    Hello

    It should work with the date in the format that you have... Look at the code, there may be a typing error... In addition, in BPEL, you must use the xp20 functions...

    Take a look at this...
    https://blogs.Oracle.com/Reynolds/entry/whats_the_time_mr_bpel

    I hope this helps...

    See you soon,.
    Vlad

Maybe you are looking for

  • TrayApp.msi missing

    I recently replaced an older HP Photosmart printer with a Pro Officejet 8610.  Before you install the new printer, I went through the control panel and uninstalled all the HP software on my system. Connected to the new printer and installed, it is so

  • Why can't I insert 16 notes on the score?

    I am a piano song that has some quick parts in it. I use the score editor to compose because I want the sheet. I can't insert 16 notes (notes with 3 'bars' on top) in the score editor. I can't insert any any point which is "faster" that an 8th note.

  • Selection of Module e/s analog compact RIO

    Hi everyone, sorry if this is the wrong place to post, I couldn't see any analog IO section in the hardware section. I'm looking to acquire an analogue of module e/s for a compact RIO, but there are a few options, and I was wondering if there was any

  • Section of remote desktop connection has been disconnected due to the protocol error

    I used Windows 7. I first run the Windows Firewall with advanced security. Then I run Remote Desktop connection. He began to load (as many times before) and then all of a sudden has generated a message from remote desktop connection "because of a pro

  • Update Server VC and 5.5 ESXi hosts to update 3 b (Build 3248547)

    I'm in vCenter Server 5.5 and 5.5 ESXi hosts.  Both are updated 3A, patched to version 201510001, which is the build 3116895.  I plan the upgrade of update 3 b (Build 3248547) and I'm a little confused on the question of SSLv3.I wonder if this point