Jump to content

Problem with _DateDiff


Recommended Posts

_DateDiff seems to fail for the difference in days if the time is included in the

date/time strings passed AND the first date/time parameter is 'older'.

Tried the code examples below in both v3.2.10.0 and v3.2.11.9 (beta), and all work

as expected except the first where $diff = $error = 0.

Searched the posts without success and would be grateful for a clue.

$diff = _DateDiff("d","2008/07/04 14:07:14","2008/07/05 12:26:54")
MsgBox(0,"","diff = " & $diff & ", error = " & @error)

$age = _DateDiff("d","2008/07/05 12:26:54","2008/07/04 14:07:14")
MsgBox(0,"","diff = " & $diff & ", error = " & @error)

$diff = _DateDiff("d","2008/07/04","2008/07/05")
MsgBox(0,"","diff = " & $diff & ", error = " & @error)

$diff = _DateDiff("d","2008/07/05","2008/07/04")
MsgBox(0,"","diff = " & $diff & ", error = " & @error)[/code

Sorry, just realised my mistake - DOH.
[/quote]

Here:

$diff = _DateDiff("d","2008/07/05","2008/07/04")
MsgBox(0,"","diff = " & $diff & ", error = " & @error)

Start time and end time.

Can we tell us what you resolve?

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...