Jump to content

datediff not working for me


Recommended Posts

Ah, yes, I cannot see the forest for the trees.

I have this code and cannot get it to work. Maybe someone else can point out my "mistake" as I cannot see it - staring too long makes one want to drink heavily but then you cannot see it anyway.

Thanks

#include <Date.au3>

$mEPTime = "2010/04/12 17:43:30"

$mCollectedTime = "2010/04/12 17:43:18"
MsgBox(0,"End read", " starting time " & $mEPTime & "    ending time " & $mCollectedTime)
$mDeltaT = _datediff('s', $mEPTime, $mCollectedTime)
if @error > 0 Then
    MsgBox(0,"","ERROR #: " & @error)
EndIf
MsgBox(0,"","Time difference", $mDeltaT)
Link to comment
Share on other sites

Hi,

bang your head against the wall:

MsgBox(0,"","Time difference: " & $mDeltaT)

You might change start date and end date as well, as you get minus seconds (see helpfile _DateDiff).

;-))

Stefan

Edited by 99ojo
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...