Ask a Question related to ASP, Design and Development.

  1. #1

    Default dateadd()

    Hi!

    I need to add 1 day to a specific date.
    The date have is stored in a variable called "DateOld". The value of the
    variable have this syntax: mm.dd.yyyy.
    The new date is the variable called "DateNew".

    This is my code that dont work:

    DateNew = DATEADD(d,1,DateOld)

    What is wrong here??
    I get this error message: Invalid procedure call or argument: 'DATEADD'


    Regards,
    Øyvind Isaksen
    Norway


    Øyvind Isaksen Guest

  2. Similar Questions and Discussions

    1. dateadd function
      I have 2 text field in a form. 1st field for input date. I want to use onclick event handler for 2nd text field. When user click 2nd text field...
    2. Facing problem in dateadd function.
      I am using dateadd function for "n" minutes but it is not working properly. Could someone tell me what is the problem in my code? <cfset...
    3. DateAdd
      Hi, Here is my due date: end of the year + 40 working day. This is what I have but it gave me the wrong date ==================== <cfset yr=...
    4. dateAdd and datePart return 13, 14, 15 instead of 1, 2, 3
      I'm trying to increment between the end of lunch and the end of the day. The code below is returning a datePart of 13 instead of 1 (for 1:00:00 PM)...
    5. DateAdd does not work
      Dear Lord, I'm trying to code a drop down for a date entry that gives the user the option of the current date plus the dates of the last 7 days....
  3. #2

    Default Re: dateadd()

    The first issue is that the first argument needs to be a string, not an
    empty variable, so you'd do:

    DateNew = DateAdd("d", 1, DateOld)

    But I don't think it'll work with that dot format. (Whoever started putting
    dots in dates and phone numbers should be eliminated!) Replace the "." with
    "/" before you use DateAdd.

    Ray at work

    "Øyvind Isaksen" <oyvind@webressurs.no> wrote in message
    news:%23QSt4wNlDHA.2140@TK2MSFTNGP09.phx.gbl...
    > Hi!
    >
    > I need to add 1 day to a specific date.
    > The date have is stored in a variable called "DateOld". The value of the
    > variable have this syntax: mm.dd.yyyy.
    > The new date is the variable called "DateNew".
    >
    > This is my code that dont work:
    >
    > DateNew = DATEADD(d,1,DateOld)
    >
    > What is wrong here??
    > I get this error message: Invalid procedure call or argument: 'DATEADD'
    >
    >
    > Regards,
    > Øyvind Isaksen
    > Norway
    >
    >

    Ray at Guest

  4. #3

    Default Re: dateadd()

    DateNew=DateAdd("d",1,DateOld)

    "Øyvind Isaksen" <oyvind@webressurs.no> wrote in message
    news:%23QSt4wNlDHA.2140@TK2MSFTNGP09.phx.gbl...
    > Hi!
    >
    > I need to add 1 day to a specific date.
    > The date have is stored in a variable called "DateOld". The value of the
    > variable have this syntax: mm.dd.yyyy.
    > The new date is the variable called "DateNew".
    >
    > This is my code that dont work:
    >
    > DateNew = DATEADD(d,1,DateOld)
    >
    > What is wrong here??
    > I get this error message: Invalid procedure call or argument: 'DATEADD'
    >
    >
    > Regards,
    > Øyvind Isaksen
    > Norway
    >
    >

    Tom B Guest

  5. #4

    Default Re: dateadd()

    Tom B wrote on 17 okt 2003 in microsoft.public.inetserver.asp.general:
    > DateNew=DateAdd("d",1,DateOld)
    >
    So true ;-)

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan. Guest

  6. #5

    Default Re: dateadd()

    The function should be culture-aware. There are plenty of cultures that have
    alternate numeric delimiters (eg . for thousands, and commas for decimals),
    date delimiters, currency formats etc. VBScript doesn't care.

    Cheers
    Ken

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uWotR2NlDHA.1740@TK2MSFTNGP12.phx.gbl...
    : The first issue is that the first argument needs to be a string, not an
    : empty variable, so you'd do:
    :
    : DateNew = DateAdd("d", 1, DateOld)
    :
    : But I don't think it'll work with that dot format. (Whoever started
    putting
    : dots in dates and phone numbers should be eliminated!) Replace the "."
    with
    : "/" before you use DateAdd.
    :
    : Ray at work
    :
    : "Øyvind Isaksen" <oyvind@webressurs.no> wrote in message
    : news:%23QSt4wNlDHA.2140@TK2MSFTNGP09.phx.gbl...
    : > Hi!
    : >
    : > I need to add 1 day to a specific date.
    : > The date have is stored in a variable called "DateOld". The value of the
    : > variable have this syntax: mm.dd.yyyy.
    : > The new date is the variable called "DateNew".
    : >
    : > This is my code that dont work:
    : >
    : > DateNew = DATEADD(d,1,DateOld)
    : >
    : > What is wrong here??
    : > I get this error message: Invalid procedure call or argument: 'DATEADD'
    : >
    : >
    : > Regards,
    : > Øyvind Isaksen
    : > Norway


    Ken Schaefer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139