using the hour interval with DateAdd

Results 1 to 3 of 3

Thread: using the hour interval with DateAdd

  1. #1
    Greg Lee Guest

    Default using the hour interval with DateAdd

    When using the hour interval with DateAdd I get ugly results after midnight. Take my example<BR><BR>dateAdd("h",4,7:00:00 PM)<BR><BR>returns 11:00:00 PM - Exactly what I want.<BR>But when I go up to midnight or beyond such as,<BR><BR>dateAdd("h",5,7:00:00 PM)<BR>dateAdd("h",6,7:00:00 PM)<BR>dateAdd("h",7,7:00:00 PM)<BR><BR>I respectively get,<BR><BR>12/31/1899<BR>12/31/1899 1:00:00 AM<BR>12/31/1899 2:00:00 AM<BR><BR>What I want is,<BR>12:00:00 AM<BR>1:00:00 AM<BR>2:00:00 AM<BR><BR>Thanks,<BR>Greg

  2. #2
    Greg Lee Guest

    Default I FIGURED IT OUT

    FormatDateTime(dateAdd("h",5,7:00:00 PM),3)<BR>will return 12:00:00 AM<BR><BR>I&#039;m so cool and you are not!

  3. #3
    Join Date
    Dec 1969

    Default actually

    hmm<BR><BR>&#062;I&#039;m so cool and you are not!<BR>if you say sooo.<BR><BR>kinda sad, i knew the answer, but whats the point,<BR>you need to read the documentation, even if it isn&#039;t clear.

Posting Permissions

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