Dateadd function not adding up...

Discussion in 'ASP General' started by Gabe, Oct 30, 2003.

  1. Gabe

    Gabe Guest

    Please see: http://www.showorders.com/test3.asp


    The code generating the page is as follows:

    testdate = "1/29/2003 1:00:00 PM"

    while count <> 5
    testdate = dateadd("n",15,testdate)
    response.write testdate & "<br>"
    count = count + 1
    wend


    What is going on there? The times should be incrementing by 15 minute
    intervals, not 14min and 59 seconds. I have several pages that have
    suddenly stopped functioning because of this strange date calculating.
    My web host insists there is nothing wrong with the ASP service. Any
    help or insight is greatly appreciated. Thanks...
     
    Gabe, Oct 30, 2003
    #1
    1. Advertising

  2. Gabe

    Ray at Guest

    That exact code produces the results you expect on my machine, XP Pro, WSH
    5.6. Are you running an older version of WSH? I can't think of anything in
    regional settings that would cause Windows to think that a minute is 59
    seconds long.

    Ray at home

    "Gabe" <> wrote in message
    news:...
    > Please see: http://www.showorders.com/test3.asp
    >
    >
    > The code generating the page is as follows:
    >
    > testdate = "1/29/2003 1:00:00 PM"
    >
    > while count <> 5
    > testdate = dateadd("n",15,testdate)
    > response.write testdate & "<br>"
    > count = count + 1
    > wend
    >
    >
    > What is going on there? The times should be incrementing by 15 minute
    > intervals, not 14min and 59 seconds. I have several pages that have
    > suddenly stopped functioning because of this strange date calculating.
    > My web host insists there is nothing wrong with the ASP service. Any
    > help or insight is greatly appreciated. Thanks...
     
    Ray at, Oct 31, 2003
    #2
    1. Advertising

  3. Gabe

    Gabe Guest

    The page is running on a Linux RedHat 7.3 operating system w/ Apache
    1.3.27 web server and ChiliSoft Server 3.6.2. The pages in question
    were working for almost 2 years then suddenly quit working when the
    functionality of the dateadd function apparently changed. I've copied
    and pasted my test page to another web host and it works fine there,
    so it seems to just be my current web hosting provider, but they say
    there is absolutely nothing wrong even after seeing the dateadd
    function is adding 14:59 instead of 15:00.

    -Gabe


    "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message news:<uo7Z$>...
    > That exact code produces the results you expect on my machine, XP Pro, WSH
    > 5.6. Are you running an older version of WSH? I can't think of anything in
    > regional settings that would cause Windows to think that a minute is 59
    > seconds long.
    >
    > Ray at home
    >
    > "Gabe" <> wrote in message
    > news:...
    > > Please see: http://www.showorders.com/test3.asp
    > >
    > >
    > > The code generating the page is as follows:
    > >
    > > testdate = "1/29/2003 1:00:00 PM"
    > >
    > > while count <> 5
    > > testdate = dateadd("n",15,testdate)
    > > response.write testdate & "<br>"
    > > count = count + 1
    > > wend
    > >
    > >
    > > What is going on there? The times should be incrementing by 15 minute
    > > intervals, not 14min and 59 seconds. I have several pages that have
    > > suddenly stopped functioning because of this strange date calculating.
    > > My web host insists there is nothing wrong with the ASP service. Any
    > > help or insight is greatly appreciated. Thanks...
     
    Gabe, Oct 31, 2003
    #3
  4. Gabe

    Ray at Guest

    "Gabe" <> wrote in message
    news:...
    > The page is running on a Linux RedHat 7.3 operating system w/ Apache
    > 1.3.27 web server and ChiliSoft Server 3.6.2.


    Nice how you failed to mention that most critical part. If there's a
    chilisoft forum anywhere, I suggest posting there to see if other people
    have the same problem.

    Ray at home
     
    Ray at, Oct 31, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Tapia

    DateAdd Function and error BC30451

    Matt Tapia, Aug 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,187
    Chris R. Timmons
    Aug 13, 2003
  2. Mel

    DateAdd Function

    Mel, Nov 4, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    6,032
  3. lofty

    DateAdd does not work

    lofty, Jul 20, 2003, in forum: ASP General
    Replies:
    5
    Views:
    177
    Chris Barber
    Jul 20, 2003
  4. Tipple
    Replies:
    2
    Views:
    135
    Tipple
    Oct 16, 2003
  5. Brandon

    Dateadd in SQL statement not working

    Brandon, May 7, 2004, in forum: ASP General
    Replies:
    9
    Views:
    397
    Brandon
    May 11, 2004
Loading...

Share This Page